LAB05

LAB05

University

9 Qs

quiz-placeholder

Similar activities

Quiz sobre Matrizes em Python

Quiz sobre Matrizes em Python

University

9 Qs

Python_Quiz_1

Python_Quiz_1

University

10 Qs

Quiz 1

Quiz 1

University

10 Qs

Java_Quiz_Part_2

Java_Quiz_Part_2

University

12 Qs

Jawab pertanyaan dibawah ini dengan benar

Jawab pertanyaan dibawah ini dengan benar

10th Grade - University

10 Qs

Teste de revisão - Liguagem C

Teste de revisão - Liguagem C

University

10 Qs

Quiz Assesmen Awal "Perangkat Keras"

Quiz Assesmen Awal "Perangkat Keras"

7th Grade - University

10 Qs

[PY]Session 02

[PY]Session 02

University

14 Qs

LAB05

LAB05

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Salman Khwaja

Used 2+ times

FREE Resource

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

8.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

a=0

if a: print("X")

elif a==False: print("Y")

else: print("Z")

X

Y

False

Z

9.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

a= "Z"

if a == "X" or "x": print ("A")

elif a == "Y" or "y": print("B")

elif a == "Z" or "z": print("C")

else: print("D")

A

B

C

D