Basic Math
Variable
Flow Control
Loop & Function
Flow Control 2
100

This character denotes the division operator.

The forward-slash (/)

100

This common variable type stores letters, numbers, and symbols.

A string

100

This statement checks the validity of a statement before creating a branch.

if statement 

100

The two types of loops in Python.

For & while loops

100

What should be the condition that is missing from the following code segment:

age = int(input("Enter your age: "))

if ___________:
    print("Eligible for voting)"

else:

    print("Not eligible for voting")


age >= 18

200

These characters have the highest order of operation in Python.

Parenthesis

200

This variable type stores decimal numbers.

A float 

200

This boolean operator checks if the value on the left is greater than the value on the right.

>

200

This is a type of loop that never stops iterating.

infinite loop

200

How would a reverse range look like where you print out numbers using a negative step where the start = 5 and the stop = -1

5

4

3

2

1

0

300

The result of 9 / 5

1

300

Data stored as a string is surrounded by these.

Quotes 

300

What is the value of 'x' after the following Python code has completed executing?
x = 100
for n in range(1,5):
    x = x*n 

print x

2,400

300

These characters MUST be put at the end of every function call.

parentheses

400

To raise the number 5 to the power of 8, you must use the power operator. This/These symbol(s) denotes the power operator.

Two asterisks (**)

400

What is the output of the following program:

if Time>30:

    Time=Time+Time%3

    Time=Time//3

    print (Time)

else:

    Time= Time%2-(Time/2)

    print (Time)

-15.0

400

The following Python code loops forever. What is it missing?
n = 10
while n<100:
   print n

an increment statement 

400

What is the output of the following program:

for i in range (1,11,3):

    if i%2==0:

        print (i)

    

4

10

500

Denoted as '%', this operator returns the remainder of a division operation.

Modulus

500

How can we swap the values of two variables (A & B) using a temp variable?

temp=A

A=B

B= temp

500

What is the output of the following program: 

y=30.0

if (y%5!=y%3):

y=y//7

else:

y= y**2

print (y)

900.0

500

What will be displayed as a result of running the program below:

def evenOrOdd(x):

    if x%2==0:

        print ("Even")

    else:

        print ("Odd")

    

for i in range (1,11,3):

    evenOrOdd(i)

  

    

Odd

Even

Odd 

Even