What is missing from this line of code?
print(Hello world!)
print(), int and input() - Python
Quiz
•
Computers
•
6th - 8th Grade
•
Easy
Chris CHA
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is missing from this line of code?
print(Hello world!)
Speech marks!
print("Hello world!")
Capital P!
Print(Hello world!)
Space before brackets!
print (Hello world)
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is wrong with this line of code?
(print "how tall are you?")
Needs another pair of brackets
(print("how tall are you?"))
Remove outside brackets, surround text with brackets instead:
print("how tall are you?")
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What needs correcting in this line of code?
print('Goodbye world!')
Add an extra space after print
print ('Goodbye world!')
Single quotes should be double quotes
print("Goodbye world!")
Remove exclamation mark
print('Goodbye world')
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What needs to be fixed in this line of code?
print(3 + 5 =, 3 + 5)
Remove parentheses
print 3 + 5 =, 3 + 5
Add quotes around text
print("3 + 5 =", 3 + 5)
Remove comma
print(3 + 5 = 3 + 5)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What needs to be added to make num1 a whole number?
num1 = input("Enter an integer")
Wrap the input inside an int() function
num1 = int(input("Enter an integer"))
Clearer text inside the input brackets
num1 = input("Enter an integer - which is a whole number, no decimals!")
6.
FILL IN THE BLANK QUESTION
45 sec • 1 pt
Turn num1 into a whole number
num1 = ____input("Enter an integer"))
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will the following code print if you type in 7?
num1 = input("Enter an integer")
print("Your number becomes: ", num1 + 10)
Your number becomes 17
Your numbers becomes: 710
TypeError: must be str, not int
Your number becomes: 17
16 questions
Python Revision
Quiz
•
8th Grade
15 questions
Python
Quiz
•
6th Grade - University
12 questions
Python
Quiz
•
7th - 8th Grade
12 questions
Year 7 Python
Quiz
•
7th Grade
15 questions
Python Programming
Quiz
•
5th Grade - University
12 questions
N5 SDD - Python input and output
Quiz
•
7th - 11th Grade
11 questions
Python Week 3 Homework - Conditional Statements
Quiz
•
8th Grade
15 questions
Python Casting and Input
Quiz
•
8th - 11th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary
Quiz
•
6th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
11 questions
Decimal/fraction conversions quick check
Quiz
•
5th - 7th Grade
10 questions
Identifying equations
Quiz
•
KG - University
44 questions
El fin del año- 7th
Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary
Quiz
•
8th Grade
49 questions
How Well Do You Know Your 6th Grade Teachers?
Quiz
•
6th Grade