NEW
Font size
WorksheetsPython Year 9 Quiz
Total questions: 19
Worksheet time: 14mins
What will the output be from the following code (can you see the error?)?
print(Hello world!)
Hello world!
SyntaxError
Hello world
print(Hello world!)
print(3+4)
name = 'Dave'
print (name)
What will be the output?
name = 'Dave'
greeting = "Good morning" + name
print (greeting)
greeting 'Dave'
Good morning Dave
Good morning name
Good morning + Dave
name = input("what is your name")
If the first three letters of the surname "Jones" were to be printed, which of the following would be correct?
print(surname[0]+surname[2]+surname[4])
print([surname[1]+surname[2]+surname[3])
print([surname[1-3])
print([surname[0]+surname[1]+surname[2])
Which of the following input statements are correct?
input="Enter your name")
name =input enter your name
name=input("Enter your name")
name=input["Enter your name"]
Which of the following converts the variable"mynumber" to an integer?
str(mynumber)
float(mynumber)
num(mynumber)
int(mynumber)
Which value below would be accepted for this input statement?
value=int(input("Enter your value here : "))
3.141
0.1204345
23.25
16
