Python Programming Quiz

Python Programming Quiz

11th Grade

15 Qs

quiz-placeholder

Similar activities

conditional and iterative statements

conditional and iterative statements

11th Grade

10 Qs

ôn tập chỉnh ảnh và làm phim

ôn tập chỉnh ảnh và làm phim

11th Grade

15 Qs

Kod Arahan

Kod Arahan

9th - 11th Grade

16 Qs

Data Manipulation IGCSE (Introduction to database) Grade 10

Data Manipulation IGCSE (Introduction to database) Grade 10

10th - 11th Grade

20 Qs

Bermain Gambar

Bermain Gambar

1st Grade - Professional Development

15 Qs

Yr 11 ICT quiz 1 Networks & Security

Yr 11 ICT quiz 1 Networks & Security

10th - 11th Grade

20 Qs

básico de Code

básico de Code

10th - 12th Grade

14 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

Python Programming Quiz

Python Programming Quiz

Assessment

Quiz

Computers

11th Grade

Practice Problem

Hard

Created by

Freddie-Ray Morrison

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?