
Python Input Basics Quiz
Authored by Ben Saddington
Fun
8th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function is used in Python to take input from the user?
`print()`
`input()`
`read()`
`scan()`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to prompt the user for their name in Python?
`name = input("Enter your name: ")`
`name = input("Enter your name")`
`name = input()`
`name = input("Enter your name: ", "Name")`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type does the `input()` function return by default?
Integer
Float
String
Boolean
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you convert a user input to an integer in Python?
`int(input())`
`str(input())`
`float(input())`
`bool(input())`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if you try to convert a non-numeric input to an integer using `int(input())`?
It will return 0
It will return an empty string
It will raise a `ValueError`
It will return `None`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a method to handle errors in Python?
`try-except`
`if-else`
`for-while`
`switch-case`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `except` block in Python?
To execute code when no errors occur
To execute code when an error occurs
To define a function
To import a module
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
Fall Trivia
Quiz
•
6th - 8th Grade
10 questions
3 Python if statements
Quiz
•
7th - 9th Grade
20 questions
Percy Jackson: The Lightning Thief Movie Quiz
Quiz
•
6th - 8th Grade
15 questions
First & Zero Conditional
Quiz
•
6th - 9th Grade
10 questions
Virtual Quizzes
Quiz
•
3rd Grade - University
17 questions
Network Topologies & Malware
Quiz
•
6th - 12th Grade
15 questions
marvel
Quiz
•
6th - 8th Grade
20 questions
Charli Damelio Quiz
Quiz
•
3rd - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade