Basic Programming Knowledge
Solution using Code
Debugging/Fixing Code
Python Syntax and Symbols
Other Programming Knowledge
100

What is a Variable used for in programming

To store/contain data or values


100

Write a code to output your favourite colour

print("blue")

100

Find the error:
print("Hello)

print("Hello")

100

How to start a comment?

#

100

Is Python high-level or low-level language

High level

200

The name of the function used to display output in Python

print()

200

Make a variable called name, set it to your name and print it

name = "Name"
print(name)

200

Find the error:

if x = 5:

Correct:
if x == 5:

200

What does * do

Multiplication

200

What is the data type called of True and False in Python

Boolean

300

The correct syntax to get input from a user?

input()

300
Write code that prints all numbers from 1-5

For i in range (1, 6)

print(i)

300

Find the error:


def greet:

print("Hi!")

correct:

def greet():

print("Hi")

300

What is the significance of []

Used to make lists

300

What does the term 'IDE' stand for

Integrated Development Environment

400

The correct symbol for 'equals to' in Python

==

400
Make a list called pets with variables in it with the 3 types of pets. Then add another element to the end of the list

pets = ['cats', 'dogs', 'fishes']

pets.append('turtles')

400

Fix the error:

for i in range(3)

print(i)

correct:

For i in range(3):

print(i)

400

What does : do after if or for statements

Creates an indentation that identifies what block of code is under the if/for statements

400

Difference between Hardware and Software

Hardware: Physical parts

Software: The programs that run on hardware

500

The name of the loop that runs as long as a condition is true

While loop

500

Write a function called hello() that outputs the statement "Hello World" and then call that function

def hello():

"Hello World!"


hello()

500

Fix the code:

num = 10

if num greater than or equal to 5

print(Big)

correct:

num = 10

if num >= 5:

print("Big")


500

What does % do in Python

Fnds the remainder between two numbers (modulus)
500

Who created Python?

Guido van Rossum

M
e
n
u