
Mastering Python Input Syntax
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
Sarah Thomas
Used 28+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to use the input function to ask the user for their name in Python?
`input("What is your name?")`
`input(What is your name?)`
`print("What is your name?")`
`ask("What is your name?")`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you convert the input received from the user to an integer?
`int(input("Enter a number: "))`
`input("Enter a number: ").int()`
`str(input("Enter a number: "))`
`input(int("Enter a number: "))`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code if the user enters `123`? ```python print(input("Enter a number: ")) ```
Enter a number: 123
123
number: 123
A runtime error occurs
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to prompt the user and store the input in a variable called `user_age`?
`user_age = input("Enter your age: ")`
`input user_age = "Enter your age: "`
`user_age = input(Enter your age: )`
`user_age = "Enter your age: "`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to use the input function to ask the user a question and store the answer in a variable, ensuring the input is treated as a float?
`response = float(input("What is the value? "))`
`response = input(float("What is the value? "))`
`response = input("What is the value? ").float()`
`response = float("What is the value? ")`
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
In the syntax given 'userAge' is known as a
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are writing code to calculate your age in hours. Which of the following is the most appropriate variable name?
ageInHours
variable1
age in hours
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
11 questions
Youtube
Quiz
•
4th Grade - University
12 questions
Windows 10 Installation
Quiz
•
11th - 12th Grade
10 questions
Soal Ujian Komputer
Quiz
•
10th - 12th Grade
15 questions
Empowerment Technologies
Quiz
•
KG - 12th Grade
15 questions
Excel
Quiz
•
10th - 12th Grade
14 questions
Pre-test: On Online searching by Innovative Teaching Ideas)
Quiz
•
6th - 12th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP
Quiz
•
1st - 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
