Column 1
Column 2
Column 3
Column 4
Column 5
100

Which of the following is NOT an accurate data type in Python?

A) String (Str)

B) Integer (Int)

C) Float (float)

D) Steam (Ste)

D) Steam (Ste)

100

n = 3**2

if (n%2==1) and (n==6):

     print("A")

else:

     print("B")


What is the result of the code?

B

100

_______ defines a function.


1) f(x)

2) f

3)def

4)defi

3)def

100
number = 1

while(number<3):

     print("Hello")

     number+=1

Hello

Hello

100

print(2323%5353)

2323

200

Which keyword is used to define a function in Python?

A) def

B) fun

C) function

D) define

A) def

200

num = 0
for i in range(1,5):
    num+=i
print(num) 

What is the result for printing the code?

10

200

What will be printed out in this equation? print (7%3)

1

200
num = 13

while(num>20):

     num*=3

     print(num)

print(num)

13

200

print(not True)

False

300

What is Python?

A)C++library 

B)Web browser

C) IDE (Integrated Developer Environment)

D) Programming language

D) Programming language

300

What would be the result of this code?
x = input(Type a number)
y = x + 5
print(y)

Error

300

names = ["Justin", "Anna", "Max", "Martin", "Susan"]

for name in names:

    if len(name)>5:

        print(name)

What would the code print?

Justin

Martin

300

c=1

while c<10:

     if c%2 == 0:

          print(c)

c+=3

4

300

How many different outputs are possible:

import random

a = random.randint(1,5)

print(a)

5

400

What will be the value of the following Python expression?

4+3%5

7
400

For a while loop to be exited, what statement should be used?

the "break" statement

400

When do we use float()?

  1. Letter

  2. Numbers with decimal

  3. Integers

  4. True/False

2. Numbers with decimal

400
message="ㅋㅋㅋ"

while len(message) < 10:

     message = message + message

print(len(message))

(Hint: len function will give the length of the String)


12

400

num = len("????")

while num<20:

     if num<10:

          num*=2

     else:

          num+=7

print(num%20)

3

500

Which of the following is invalid variable?


A) my_string_1

B) 1st_string

C) foo

D) _

B) 1st_string

500

b=3

if b%2 == 1:

     print("Condition 1 Satisfied")

if b%2 != 3:

     print("Condition 2 Satisfied")

Condition 1 Satisfied

Condition 2 Satisfied

500

What will be the answer of the following code? print(2**3 + (5 + 6)**(1 + 1))

129

500

a = (39482**19)%7

b = a

if b > 10:
     a*=0

elif b>20:

     a+=7

print(a==b)

True

500

The variable value is an integer. What will the following code print out?

4