Python Midterm

Quiz
•
Computers
•
12th Grade
•
Medium
Joseph Gilliam
Used 45+ times
FREE Resource
74 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct data type for a whole number in Python?
A) Integer
B) Float
C) String
D) Boolean
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a string variable in Python?
A) var_name = 42
B) var_name = 3.14
C) var_name = "Hello"
var_name = True
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to take user input in Python?
A) input()
B) print()
C) read()
D) get()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the print() function do in Python?
A) Takes user input
B) Displays output on the console
C) Performs mathematical operations
D) Defines a function
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the // operator do in Python?
A) Floor division
B) Exponentiation
C) Modulus
D) Addition
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
result = 5 + 3 * 2
print(result)
A) 16
B) 11
C) 13
D) 26
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of the expression True and False?
A) True
B) False
C) Error
D) None
Create a free account and access millions of resources
Similar Resources on Wayground
73 questions
untitled

Quiz
•
4th Grade - University
70 questions
A Level Computer Science

Quiz
•
12th Grade
72 questions
Computer Number Systems Quiz

Quiz
•
12th Grade
76 questions
ITF+ Quiz Part 17

Quiz
•
12th Grade
74 questions
Unity Certification Prep-Chapters 1-5

Quiz
•
12th Grade
70 questions
QA-BA-Quiz-1-Week-1-Mar-2024

Quiz
•
9th - 12th Grade
71 questions
SRWE Final Exam Q's 61-120

Quiz
•
12th Grade
70 questions
MIDTERM EXAM

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade