stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Duplicate of Python simple Flashcards | StudBud
Explore
/
Duplicate of Python simple
Duplicate of Python simple
7 terms
·
StudBud Administration
·
13 plays
Covering some basic programming concepts in python 2.7
Flashcards
7 cards
F
Practice quiz
P
Host live
L
Questions
7
Answers
1
What error message would you get when running this code?
expected an indented block
Syntax error
error in your program: EOL while scanning string literal
name 'x' is not defined
2
Which line of code will store a string to the variable
ANSWER?
ANSWER = int(raw_input("What is your favourite colour"))
ANSWER = 46
ANSWER = raw_input("What is your favourite colour")
answer = 46
3
What line of code would you use to print the variable
NAME
using python?
print "NAME"
print NAME
print name
"NAME"
4
what value does X have when: X = 9 * 7
16
"63"
X
63
5
Which of these is not a type of error you would encounter with python
Permanent error
Logical error
Syntax error
Value error
6
What will be printed if this code is run?
7
'B','R','A','D','L','E','Y'
2
Bradley
7
What will be printed if this code is run?
Give me an a 2 Give me an i 5
2 5
Give me an 3 Give me an 5 Give me a 7 Give me an 8
Give me an a Give me an i