
Python_Ch7_User inputs and testing your code
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Medium
Used 2+ times
FREE Resource
Enhance your content in a minute
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return type of input()?
Integer
String
Float
List
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to take user input in Python?
get()
input()
scan()
read()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you convert the result of input() to an integer in Python?
int(input())
str(input())
float(input())
bool(input())
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does assert do in a test case?
Prints a message
Stores a variable
Defines a loop
Raises an error if a condition is false
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a test case in unittest?
What is a test case in unittest?
A method that tests a specific functionality
A class attribute
A loop over data
A function that processes input
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you validate that input is not empty?
if input == 0
if input.isalpha()
if input.isdigit()
if input == ""
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a unit test?
A test of user input
A test of the entire program
A test of a specific function or method
A test of a loop
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
20 questions
Web Application Security Testing-PreTest
Quiz
•
Professional Development
15 questions
Introduction to the Internet of Things
Quiz
•
12th Grade - Professi...
15 questions
C Module 1 Quiz
Quiz
•
Professional Development
15 questions
SEC+ Ch.8 Review Test
Quiz
•
Professional Development
12 questions
Flutter Basics
Quiz
•
Professional Development
15 questions
SEC+ Ch.6 Review Test
Quiz
•
Professional Development
16 questions
VR and AR Tutorial 1
Quiz
•
Professional Development
16 questions
Digital etiquette
Quiz
•
KG - Professional Dev...
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
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
