if statment

if statment

10th Grade

6 Qs

quiz-placeholder

Similar activities

Data and Society

Data and Society

9th Grade - University

11 Qs

Arrays

Arrays

10th - 12th Grade

10 Qs

Code.org Unit 3 Conditionals

Code.org Unit 3 Conditionals

9th - 12th Grade

7 Qs

Introduction to Loops

Introduction to Loops

10th Grade

10 Qs

Python 2

Python 2

9th - 12th Grade

10 Qs

Python Level 2- Lesson 2

Python Level 2- Lesson 2

10th Grade

10 Qs

AP CSA Unit 1 & 2 Review

AP CSA Unit 1 & 2 Review

9th - 12th Grade

10 Qs

Advanced Python Iteration Quiz

Advanced Python Iteration Quiz

10th Grade

10 Qs

if statment

if statment

Assessment

Quiz

Computers

10th Grade

Easy

Created by

Rania Mustafa

Used 28+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

What will be the result of the following code:

x = 5
y = 8
if x > y:
   print('Hello')

else:
  print('Welcome')

Hello

Welcome

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image


what is the output?

Print "Yes" if a is equal to b, otherwise print "No".


Print "No" if a is equal to b, otherwise print "Yes".

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

whta is the output?

print "1" if a is greater than b,

Print "2" if a is equal to b,

otherwise print "3".

Print "1" if a is equal to b,

print "2" if a is greater than b,

otherwise print "3".


4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code:

a = 10
b = 5
if a < b:
  print('Greater')
else:
  print('Smaller or Equal')

Greater

Smaller or Equal

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following code snippet?

num = 3
if num == 3:
  print('Three')
elif num > 3:
  print('Greater than Three')

Three

Greater than Three

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed by this code?

value = 7
if value >= 10:
  print('High')
else:
  print('Low')

High

Low