LAB05

LAB05

University

9 Qs

quiz-placeholder

Similar activities

.NET WW1 Q2

.NET WW1 Q2

12th Grade - University

10 Qs

iMac Basics Quiz

iMac Basics Quiz

5th Grade - University

12 Qs

Scratch Math Quiz Program

Scratch Math Quiz Program

7th Grade - University

14 Qs

[Quiz] Python Function

[Quiz] Python Function

University

12 Qs

6-sinf Informatika

6-sinf Informatika

6th Grade - University

10 Qs

Chapter Quiz

Chapter Quiz

University

10 Qs

Conditional Control Statements

Conditional Control Statements

8th Grade - University

10 Qs

CLC Lesson 6 Quiz

CLC Lesson 6 Quiz

University

12 Qs

LAB05

LAB05

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Salman Khwaja

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

a = "August"

b = "July"

c = "January"

if a < b:

print("b1", end="")

if b < c:

print("b2", end="")

elif a < c:

print("b3", end="")

else:

print("b4", end="")

b1

b1b2

b3

b1b3

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

num = 25

if num != 0:

if num >= 5.0:

print("first block is executed")

elif num == 5:

print("third block is executed")

else:

print("second block is executed ")

else:

print("No output")

third block is executed

first block is executed

No output

second block is executed

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

num = 25

num = num//5

if num%1 == 0:

print(str(num)+ " is integer")

else:

print(str(num)+ " is float")

5 is float

5.0 is float

5 is integer

5.0 is float

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the range of values of x for which the following code will print the word two?
x=int(input("Enter x: "))

if x > 3 or x < 6:

print("one")

elif x <= 3:

print("two")

else:

print("Three")

all values <= 3

values <= 3 or values >= 6

The code will never print the word two

values > 3 and values < 6

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

s="Beta"; t="alpha"

if s<t: print("L")

elif s==t: print("=")

else: print("G")

L

=

G

No output

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

vals=[0,1,2];

x=False

if x in vals: print("I",end="")

elif x==0 in vals: print("J",end="")

else: print("K",end="")

I

J

K

None

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

x=10;y=5;z=30

if not (x<z and x>y): print(x)

else: print(x+z)

10

5

30

40

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?