background preloader

Coding Resources

Facebook Twitter

Engineer's Belief Joke. Python3 Tutorial: Formatted Output. Three Ways for a Nicer Output In this chapter of our Python tutorial we will have a closer look at the various ways of creating nicer output in Python.

Python3 Tutorial: Formatted Output

We present all the different ways, but we recommend that you should use the format method of the string class, which you will find at end of the chapter. "string format" is by far the most flexible and Pythonic approach. So far we have used the print function in two ways, when we had to print out more than two values: The easiest way, but not the most elegant one:We used print with a comma separated list of values to print out the results, as we can see in the following example. The Old Way or the non-existing printf and sprintf Is there a printf in Python? The following diagram depicts how the string modulo operator works: Untitled. What is Polymorphism? Webopedia. Python None Use: TypeError. Built-in Dictionary List Set Tuple 2D Array Bytes Class Console Convert Datetime Def Duplicates Error File Generator If Itertools Lambda Lower Map Math None Number Path Print Re Slice Sort Split String Urllib While None is a special value.

Python None Use: TypeError

It is a value that indicates no value. It is often returned by collections (such as dictionaries) or methods.We must handle it in a special way:we cannot call methods,such as len(),on a None value. Based on: Python 3 Example This example shows a common TypeError that occurs with None values. Tip:If a variable may equal None, we must first use an if-statement to check for this condition. Python program that assigns to None # Get length of this string. s = "value" print(len(s)) # Cannot get length of None. s = None print(len(s)) Output 5 Traceback (most recent call last): File " Example 2. What is the Difference Between Compiler and Interpreter? A Compiler and Interpreter both carry out the same purpose – convert a high level language (like C, Java) instructions into the binary form which is understandable by computer hardware.

What is the Difference Between Compiler and Interpreter?

They are the software used to execute the high level programs and codes to perform various tasks. Specific compilers/interpreters are designed for different high level languages. However both compiler and interpreter have the same objective but they differ in the way they accomplish their task i.e. convert high level language into machine language. Through this article we will talk about the basic working of both and distinguish the basic difference between compiler and interpreter. Compiler A compiler is a piece of code that translates the high level language into machine language. Shown in the figure is basic outline of the compilation process, here program written in higher level language is known as source program and the converted one is called object program. Git FAQ. What is Git?

Git FAQ

Git is a distributed version control system developed by Junio Hamano and Linus Torvalds. Git does not use a centralized server. Git runs on Linux, BSD, Solaris, Darwin, Windows, Android and other operating systems. Why the 'Git' name? Quoting Linus: "I'm an egotistical bastard, and I name all my projects after myself. ('git' is British slang for "pig headed, think they are always correct, argumentative"). Alternatively, in Linus' own words as the inventor of Git: "git" can mean anything, depending on your mood: Random three-letter combination that is pronounceable, and not actually used by any common UNIX command. How do I report a bug in Git? Git FAQ. 24.5. turtle — Turtle graphics for Tk — Python 2.7.8 documentation. 24.5.1.

24.5. turtle — Turtle graphics for Tk — Python 2.7.8 documentation

Introduction Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an import turtle, give it the command turtle.forward(15), and it moves (on-screen!) By combining together these and similar commands, intricate shapes and pictures can easily be drawn. The turtle module is an extended reimplementation of the same-named module from the Python standard distribution up to version Python 2.5.

It tries to keep the merits of the old turtle module and to be (nearly) 100% compatible with it. The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. The object-oriented interface uses essentially two+two classes: The TurtleScreen class defines graphics windows as a playground for the drawing turtles. Note. Sheffield CLCs Blog. This page contains a list of tools (both hardware and software) to enhance teaching and learning across the age range and curriculum, and some examples of how to use them.

Sheffield CLCs Blog

All tools are free unless otherwise noted. Please add your own suggestions in the comments. Popplet – This is a really nice looking tool to create mindmaps, posters, galleries, and anything else you can think of that involves boxes that you can add text, drawings, images and videos to. You can see an example here of one used in Spanish by Jose Picardo to revise holiday vocabulary.Posterous – This is a really easy way to set up a blog. You register your e-mail address with the site, and to post you simply e-mail Posterous with a message. Making Office documents more whizzy: SENcomputing - Useful Links. Impact of games: brain training - Content Writer. The Effect of Video Games on the Brain. Biology 2022004 First Web Paper On Serendip Eleni Kardaras The effect of video games on the brain is a research area gaining popularity as the percentage of children and adults who play video games is on the rise.

The Effect of Video Games on the Brain

Some people believe violence in video games and in other media promotes violent behavior among viewers. While there is not sufficient data to validate this claim, there are a number of studies showing that video games can increase aggressive behavior and emotional outbursts, and decrease inhibitions. From a few of these studies, and from my own observations of children playing video games, it is quite obvious that the video games do have at least some effect on the behavior of the player. I had a chance to observe the effects of video games first hand on two boys, ages eight and ten, when I babysat them earlier in the semester. Akio Mori, a professor at Tokyo's Nihon University, conducted a recent study observing the effects of video games on brain activity.

References. Impact of computer games on society - Content Writer. Tinyurl.com/10AComputing - Teacher's Notebook. SORTING.