Sunteți pe pagina 1din 1

Attribute

Error
You are calling a
method on the wrong
My code isn't working :-(
type of object Start here...
What type A variable that should I'm trying to print a value
contain a value does not
SyntaxError of error do yes You are storing the return
but getting a weird-
looking string
You've forgotten the you get? value of a function which You are printing an object
changes the variable (e.g. a FileObject) when
quotes around a string
itself (e.g. sort) you want the result of
You have forgotten to calling a method on the
A number which should
put a colon at the end
of a def/if/for line
Do you get an be a fraction is coming object

You have different


NameError error when you
out as zero in Python 2
You are dividing integers
A regular expression is
not matching when I
number of open and You've misspelt a variable, run the code? rather than floats. expect it to
Convert the numbers to You have forgotten to use
close brackets in a function or method name
statement floats or from __future__ raw strings or escape
You've forgotten to
import division backslash characters
import a module
You've forgotten to
no I am reading a file but getting no input
TypeError define a variable You have already read the contents of the file earlier
You're trying to use an in the code, so the cursor is at the end.
Your code uses a
operator on the wrong variable outside the Does the code
type of objects scope where it's defined
An object which you
use loops or if neither
Your code calls a function
expect to have a value is before it's defined statements?
actually None loops
You're trying to print a
You've used non-integer single word and have
numbers in a list slice forgotten the quotes A list which should have I am trying to loop over a
if a value for every iteration collection of strings, but
You've called a method/
function with the wrong only has a single value am getting individual
number or type of You have defined the list characters
arguments IOError Two numbers which should
inside the loop: move it
outside
You are iterating over a
string by mistake
You're trying to open a be equal are not
file that doesn't exist You are comparing a number A loop which uses the I am trying to write
Indentation with a string representation
of a number (e.g. if 3 == "3")
range function misses
out the last value
multiple lines to a file but
only getting a single one
Error KeyError A complex condition is not
The range function is
exclusive at the finish:
You have opened the file
giving the expected result inside the loop: move it
You've used a mixture You're trying to look increase it by one.
The order of precedence in the outside
of tabs and spaces up a key that doesn't
condition is ambiguous - add
You haven't indented all exist in a dict
some parentheses
lines in a block equally also check...
http://pythonforbiologists.com

S-ar putea să vă placă și