Search Header Logo

Grade 11 Quiz: Selection Programming Construct in Python

Authored by Rica Paming

Other

11th Grade

Grade 11 Quiz: Selection Programming Construct in Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of conditional statements in programming?

To organize code into functions

To repeat a block of code multiple times

To make decisions based on conditions

To define variables

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a selection programming construct?

A function definition

An if-else statement

A loop that iterates 10 times

A variable assignment

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which comparison operator checks if two values are equal?

!=

==

<=

>=

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for an if-else statement in Python?

if condition: do_something else: do_something_else

if condition: do_something; else: do_something_else

if condition { do_something } else { do_something_else }

if condition: do_something else: do_something_else

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Arrange the following scrambled Python code into the correct sequence: 1. print('Eligible to vote') 2. if age >= 18: 3. age = int(input('Enter your age: '))

2, 3, 1

3, 2, 1

1, 3, 2

3, 1, 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False: Sequential programming constructs execute code in the order it is written.

False

True

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False: Selection constructs allow programs to make decisions based on conditions.

True

False

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?