Begining in CS
Numbers and Data
Making Decisions
Repetition & Loops
More CS
100

Which of the following falls under the field of computer science? Logical Thinking, Data, Algorithms, All of the above.

All of the above

100

What are the possible outputs of the following?

print(random.randint(1, 5))

1,2,3,4,5

100

To test if x is less than or equal to y:

if (x ___ y):


What symbol would you use?

<=

100

Loops can be used to __________

Repeat sections of code

100

What symbol is used in python to create a comment?

#

200

Python is an example of __________

Formal Language 

200

What is the symbol for integer division?

//

200

When do you use an elif statement?


To check multiple expressions for TRUE and execute a block of code as soon as one of the conditions evaluate to TRUE

200

What should be entered to make the loop below print

55,60,65


x = 50

while (x < 65):

  x = x + ____

  print (x)

5

200

Symbols that store values are called what?

variables

300

Using a mouse to click on an email is an example of

Input

300

Consider the following code:

a = 2 

b = 3 

print(a ** b)


What is the output?

8

300

When is a compound conditional true when using the keyword 'or'?

One test is true and the other is false.& Both tests are true

300

The following loop is intended to print the numbers

2 4 6 8 10

Fill in the blank:

for i in ________:

 print (i)

range(2,11,2)

300

Which command can be used to convert variables into an integer?

int()

400

What is a variable? Define & Example

Variables are a name for a spot in the computer's memory

c = 1

400

 To generate numbers between and including -5 to 5 you would use:

random.randint(-5,5)

400

When should you use an else statement?

To execute code if none of the other expressions were TRUE

400

Consider the following code:

for r in range (5, 21, 5):

   print("Thomas")


How many times will the name be printed?

4

400

What do we call sets of large data that are so big or complex that normal programs and applications are not able to process them?

Big Data

500

Which of the following would be the best variable name to store the value of your English number grade?

EG, N,G1, number_Grade

number_Grade
500

Convert the following decimal number to binary:

5

101

500

The following code will not compile. Spot the but that would allow the code to compile and run as intended?

if (x >= -10 and <= 10):
    print("In range")

if (x >= -10 and x <= 10):

500

What is output by the following code?

for i in range(73, 43, -2):

    print(i)

 All the numbers from 73 to 45 counting backwards by 2

500

What line of code correctly stores and inputs user's name?

n = str(input("Enter: "))