Python PRIMM L4

Python PRIMM L4

6th Grade

8 Qs

quiz-placeholder

Similar activities

Cyber Safety

Cyber Safety

3rd - 6th Grade

11 Qs

Informatika

Informatika

6th - 8th Grade

10 Qs

Scratch

Scratch

KG - Professional Development

10 Qs

Bài tập trắc nghiệm C++(tiếp)

Bài tập trắc nghiệm C++(tiếp)

3rd Grade - University

10 Qs

CD 3 PHẦN MỆ SOẠN THẢO VĂN BẢN

CD 3 PHẦN MỆ SOẠN THẢO VĂN BẢN

1st - 7th Grade

12 Qs

Basic Printf

Basic Printf

1st - 10th Grade

10 Qs

Šesti kviz 1

Šesti kviz 1

6th Grade

10 Qs

Python PRIMM L4

Python PRIMM L4

Assessment

Quiz

Computers

6th Grade

Practice Problem

Hard

Created by

Matthew Kelsall

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...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an `if` statement in Python?

To repeat a block of code multiple times

To execute a block of code only if a certain condition is true

To define a function

To import a module

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a comparison operator in Python?

`+`

`==`

`*`

`//`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the `elif` keyword do in a Python program?

It ends a loop

It checks another condition if the previous `if` condition was false

It defines a new function

It imports a library

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code snippet: ```python temperature = 25 if temperature > 30: print("It's hot!") elif temperature > 20: print("It's warm!") else: print("It's cold!") ``` What will be printed if `temperature` is 25?

It's hot!

It's warm!

It's cold!

Nothing will be printed

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a comparison operator in Python?

`!=`

`<=`

`<>`

`>=`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? ```python age = 16 if age >= 18: print("You can vote.") else: print("You cannot vote.") ```

You can vote.

You cannot vote.

Error

Nothing

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the following code, what will be the output if `score` is 85? ```python score = 85 if score >= 90: print("Grade: A") elif score >= 80: print("Grade: B") else: print("Grade: C") ```

Grade: A

Grade: B

Grade: C

No output

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?