What data type would you use to store a person's age in Python?

Python Programming Quiz

Quiz
•
Computers
•
11th Grade
•
Hard

Freddie-Ray Morrison
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
`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
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Basic Python Coding

Quiz
•
11th - 12th Grade
18 questions
Programming Terms & Structures

Quiz
•
11th Grade
20 questions
Python year 9

Quiz
•
8th - 11th Grade
10 questions
Python Exception Handling

Quiz
•
10th - 12th Grade
14 questions
T-Level DPDD: File Handling Quiz

Quiz
•
11th Grade
20 questions
Python Basics & Syntax

Quiz
•
10th - 12th Grade
13 questions
2.5 Translators & Facilities - OCR GCSE Computer Science

Quiz
•
7th - 12th Grade
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade