stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python simple Year 8 Flashcards | StudBud
Explore
/
Python simple Year 8
Python simple Year 8
7 terms
·
StudBud Administration
·
102 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 line of code would you use to print the variable
NAME
using python?
"NAME"
print "NAME"
print name
print (NAME)
2
What error message would you get when running this code?
error in your program: EOL while scanning string literal
Syntax error
name 'x' is not defined
expected an indented block
3
Which of these is not a type of error you would encounter with python
Syntax error
Logical error
Permanent error
Value error
4
Which line of code will store a string to the variable
ANSWER?
answer = 46
ANSWER = input("What is your favourite colour")
ANSWER = 46
ANSWER = int(input("What is your favourite colour"))
5
What will be printed if this code is run?
Give me an a 2 Give me an i 5
2 5
Give me an a Give me an i
Give me an 3 Give me an 5 Give me a 7 Give me an 8
6
what value does X have when: X = 9 * 7
X
63
"63"
16
7
What will be printed if this code is run?
Bradley
2
'B','R','A','D','L','E','Y'
7