Python Selection Programming Test

Python Selection Programming Test

University

10 Qs

quiz-placeholder

Similar activities

Q8 - FundComp - Python Básico (En)

Q8 - FundComp - Python Básico (En)

University

10 Qs

Understanding Structures in Python

Understanding Structures in Python

University

15 Qs

Python_IISem_IA1_quiz

Python_IISem_IA1_quiz

University

10 Qs

Food Chains Review

Food Chains Review

3rd Grade - University

15 Qs

Avaliação Pensamento Computacional - Prático

Avaliação Pensamento Computacional - Prático

1st Grade - Professional Development

10 Qs

Recuperação Geral de Pensamento

Recuperação Geral de Pensamento

1st Grade - Professional Development

13 Qs

Understanding If Else in C Programming

Understanding If Else in C Programming

University

10 Qs

python

python

University

10 Qs

Python Selection Programming Test

Python Selection Programming Test

Assessment

Quiz

Science

University

Hard

Created by

152236035100 -242

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: `x = 10; if x > 5: print('Greater')`?

Greater

Less

Equal

Not Greater

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to start a conditional statement in Python?

unless

if

case

when

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this code: `x = 3; if x == 3: print('Equal'); else: print('Not Equal')`?

Equal

Equal to 4

Equal to 2

Not Equal

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, which of the following is NOT a valid comparison operator?

=<

>>

<=

==

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `elif` statement in Python?

The `elif` statement is a way to end a program in Python.

The `elif` statement is used to define a loop in Python.

The purpose of the `elif` statement is to provide additional conditional checks in an if-else structure.

The `elif` statement is used to declare variables in Python.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: `x = 5; if x < 5: print('Less'); elif x == 5: print('Equal'); else: print('Greater')`?

Equal

Greater

Less

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements correctly checks if a variable `a` is not equal to 10?

a == 10

a = 10

a <> 10

a != 10

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Science