WorksheetsIntroduction to Python programming
Total questions: 20
Worksheet time: 12mins
What will be the output?
name = "Dave"
print (name)
Dave
'Dave'
name
(name)
What would print (10 + 16) produce?
10
16
24
26
What is a input?
To plug in something.
A function that allows us to ask the user to enter some data.
Data displayed on a screen.
A function
name=input("What is your name? ")
print("Your name is " + name)
What will be displayed if the user types in "Bob"?
Your name is name
name
Bob
Your name is Bob
What, if anything, is wrong with the following?
input=x("Type your password: ")
print(x)
The variable should be switched with the input command
Input commands don't need ( )
You can't print x
Nothing is wrong
What, if anything, is wrong with the following?
x=input("Type your password: ")
print("You typed", x)
The variable should be switched with the input command
You can't use commas in print statements
You can't print x
Nothing is wrong
What does symbol % do?
Integer exact division
Percentage
Division
Remainder
Which symbol represents multiplication?
*
/
+
**
print(3*4+5)
What is the answer to?
print(10 % 4)
1
3
2
4
