NEW
Font size
WorksheetsGrok- Python Quiz
Total questions: 27
Worksheet time: 27mins
Correct Python Code View for Hello, World! is?
Print ('hello, World!')
print ('Hello, World!')
Print (“hello, world!”)
print (Hello World)
Correct Python Code View of What is your name? is?
name = input(“what is your name? ')
name = input('What is your name.)
name = input('What is your name? ')
name=input('What is your name? ')
Correct Python Code View of Hello, Mia is?
print('Hello,', name)
pRint('Hello,', name)
print('Hello,', NAME)
print ('HelloName’)
Correct Python Output View of:
print ("So you call yourself '" + name + "' huh?")
So you call yourself 'Rory' huh?
So You call your self 'Rory' huh?
So you call yourself 'Rory' Huh”
So you call yourself 'Rory' HUH?”
Friend1 = input("Friend: ")
print ("Hello, young " + Friend1)
output view is:
Friend: Trever
Hello, young Trever
friend: Trever
hello, young Trever
Friend Trever
Hello young Trever
FriendTrever
Hello, young Trever
text = input('Enter text: ')
print(len(text))
is an example of:
Enter text: hi
2
Enter text: BOO
4
Enter text: Hello
10
Enter TEXT: Hiiii
2
word = input('What do you want me to say? ')
num = int(input('How many times do you want me to say it? '))
print (word * num)
an example is:
What do you want me to say? Hi
How many times do you want me to say it? 2
HiHi
What do you want me to say? HI
How many times do you want me to say it? 1
HIHIHI
What do you want me to do?
How many times do you want me to say it? 1
What does the term 'debug' mean?
Identify errors and fix them.
Making a calculation
A set of instructions
Looking at code
What does the print function do in python?
It's a variable.
It can input data.
It displays something like a string or integer
It loops
What will the output be from the following code?
print(Hello world!)
Hello world!
SyntaxError
Hello world
print(Hello world!)
What will the output be from the following code?
print(3+4)
3+4
SyntaxError
7
print(3+4)
What will the output be from the following code?
print("3+4")
7
34
SyntaxError
3+4
What will the output be from the following code?
print("Hello" + "world!")
Hello world!
Helloworld!
SyntaxError
"Hello" "world!"
Which Python command is used to output information to the screen?
read
output
display
What is syntax?
Syntax is the word used to describe an error
Syntax is the rules of the programming language
It is used to read information
It is used to output information
A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly
True
False
What will be the output?
name = 'Dave'
print (name)
Dave
'Dave'
name
(name)
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
Good morning + Dave
Good morning name
Good morning Dave
Good morning 'Dave'
Why is it called 'Python'?
The guy who created it loves snakes
The guy who created it loves Monty Python films
You can create a game on python called snake
It was created by someone called Mr Python
Python is an example of a....
Text-based programming language
Object orientated programming language
language written in java script
Visual-based programming language
If you want more than one option for your code, what do you use (after if)?
elif
else
ifif
after this/
Data type that can only be true or false
string
Integer
boolean
float
A data type consisting of numbers, letters and symbols.
String
Integer
Float
Boolean
A location in memory used to store data that can be changed.
Constant
Value
Variable
Iteration
A variable that can hold a collection of values, often called an array in other programming languages
list
int
string
constant
What does the print function do in python?
It's a variable
It can input data.
It displays something like a string or integer
It loops the code.
What programs can you learn Python through?
Grok / CodeCademy
Word / Grok
Scratch / Microsoft
