
Python Programming Quiz
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Hard
Freddie-Ray Morrison
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type would you use to store a person's age in Python?
`float`
`string`
`int`
`boolean`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to open a file for reading in Python?
`open("myfile.txt", "r")`
`file.open("myfile.txt", "read")`
`open.file("myfile.txt", "r")`
`file("myfile.txt", "read")`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code snippet? ```python print(type(3.14)) ```
`int`
`float`
`string`
`number`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you correctly handle an exception in Python?
```python try: # code to try except ErrorName: # code to run in case of an error ```
```python try: # code to try catch ErrorName: # code to run in case of an error ```
```python try: # code to try error ErrorName: # code to run in case of an error ```
```python try: # code to try failure ErrorName: # code to run in case of an error ```
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a mutable data type in Python?
`tuple`
`string`
`list`
`int`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you read a file line by line in Python?
```python with open("myfile.txt") as file: for line in file.readlines(): print(line) ```
```python with open("myfile.txt") as file: while line = file.readline(): print(line) ```
```python with open("myfile.txt", "r") as file: for line in file: print(line) ```
All of the above
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Whos the best football team?
PUFC
POSH
Peterborough United
Not cambridge
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
Attacks Threats & Vulnerabilities (C1)
Quiz
•
9th - 12th Grade
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
11 questions
Câu hỏi ôn tập HKII_Tin học 6
Quiz
•
8th Grade - Professio...
20 questions
Python básico
Quiz
•
9th - 12th Grade
10 questions
Python Alternating Turns
Quiz
•
7th - 12th Grade
10 questions
Lesson 01 Unit 1 Excel 2019/365 MOAC
Quiz
•
9th - 12th Grade
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
10 questions
Inspire - AI Trivia
Quiz
•
11th 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
