
Python Variables and Input
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Gitika Kaur
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in Python?
A variable in Python is a data type.
A variable in Python is a function.
A variable in Python is a loop control statement.
A variable in Python is a name that refers to a value.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a variable in Python?
You assign a value to a variable name using the '=' operator.
You use the 'const' keyword to declare a variable.
You use the 'let' keyword to declare a variable.
You use the 'var' keyword to declare a variable.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'print' function in Python?
To read input from the user.
To perform mathematical calculations.
To display output on the console or terminal.
To create a new variable.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you print multiple variables in a single line in Python?
print(var1 + var2 + var3)
print(var1 + ' ' + var2 + ' ' + var3)
print(var1, '+', var2, '+', var3)
print(var1, var2, var3)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 5 y = 3 print(x + y)
8
7
2
15
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 'Hello' y = 'World' print(x + y)
HelloWorld!
HelloWorld
Hello, World
Hello World
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? x = 10 y = '5' print(x + y)
15
TypeError
105
TypeError: unsupported operand type(s) for +: 'int' and 'str'
Access all questions and much more by creating a free account
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
15 questions
PH 1 INFORMATIKA XI
Quiz
•
11th Grade
13 questions
python A
Quiz
•
10th Grade
15 questions
Ethical and Social Issues in ICT
Quiz
•
10th Grade
10 questions
ICT Java programming workshop
Quiz
•
9th Grade
10 questions
analisis data dan visualisasi data
Quiz
•
10th Grade
15 questions
Javascript Quiz 2
Quiz
•
11th Grade
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
10 questions
Latihan ICT Part 2
Quiz
•
10th 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
