N5 - Python Recap
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
S Johnston
Used 3+ times
FREE Resource
Enhance your content in a minute
28 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does input("Enter your name: ") do?
Displays your name
Prints a message
Asks the user for input
Creates a variable
Answer explanation
The function input("Enter your name: ") prompts the user to enter their name, effectively asking for input. It does not display or print anything by itself, nor does it create a variable directly.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line outputs a message to the screen?
input("Message")
print("Message")
message = "Message"
display("Message")
Answer explanation
The correct choice is 'print("Message")' because it is the function used in Python to output messages to the screen. The other options do not display messages: 'input' takes input, assignment does not output, and 'display' is not a standard function.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of: print("Hello" + "World")
Hello + World
Hello World
HelloWorld
Error
Answer explanation
The expression 'Hello' + 'World' concatenates the two strings without any space, resulting in 'HelloWorld'. Therefore, the correct output is 'HelloWorld'.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this line? print("Your age is " + age)
Nothing
It needs int(age)
It needs str(age)
The + is incorrect
Answer explanation
The line is incorrect because 'age' is likely an integer. To concatenate it with a string, it needs to be converted to a string using str(age). Thus, the correct choice is 'It needs str(age)'. This allows proper string concatenation.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which input line saves the response in a variable?
print("Enter your name")
input("Enter your name")
name = input("Enter your name: ")
response = print("Enter name: ")
Answer explanation
The correct choice is 'name = input("Enter your name: ")' because it assigns the user's input to the variable 'name'. The other options either do not save the input or use incorrect syntax.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line assigns the value 12 to a variable?
12 = age
age == 12
age = 12
assign age 12
Answer explanation
The correct line is 'age = 12', which uses the assignment operator '=' to assign the value 12 to the variable 'age'. The other options either use incorrect syntax or do not perform an assignment.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is a string?
"17"
17
True
17.0
Answer explanation
The correct choice is "17" because it is enclosed in quotes, making it a string. The other options are either numbers or a boolean, which are not strings.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
23 questions
Chapter 5 & 6 Review
Quiz
•
9th - 12th Grade
23 questions
AP Computer Principles Quiz
Quiz
•
11th Grade - University
25 questions
Quiz #4 Etech
Quiz
•
11th Grade
25 questions
Data Science - Pre Assessment - Fall 2021
Quiz
•
9th - 11th Grade
25 questions
EDPM Form 4 - Quiz 1
Quiz
•
7th - 12th Grade
25 questions
CONDITIONAL STATEMENTS
Quiz
•
11th - 12th Grade
25 questions
Microsoft Word Unit 14 Test Review
Quiz
•
9th - 12th Grade
23 questions
Revision grade 11 term 3
Quiz
•
11th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University
