What is a Variable used for in programming
Write a code to output your favourite colour
print("blue")
Find the error:
print("Hello)
print("Hello")
How to start a comment?
#
Is Python high-level or low-level language
High level
The name of the function used to display output in Python
print()
Make a variable called name, set it to your name and print it
name = "Name"
print(name)
Find the error:
if x = 5:
Correct:
if x == 5:
What does * do
Multiplication
What is the data type called of True and False in Python
Boolean
The correct syntax to get input from a user?
input()
For i in range (1, 6)
print(i)
Find the error:
def greet:
print("Hi!")
correct:
def greet():
print("Hi")
What is the significance of []
Used to make lists
What does the term 'IDE' stand for
Integrated Development Environment
The correct symbol for 'equals to' in Python
==
pets = ['cats', 'dogs', 'fishes']
pets.append('turtles')
Fix the error:
for i in range(3)
print(i)
correct:
For i in range(3):
print(i)
What does : do after if or for statements
Creates an indentation that identifies what block of code is under the if/for statements
Difference between Hardware and Software
Hardware: Physical parts
Software: The programs that run on hardware
The name of the loop that runs as long as a condition is true
While loop
Write a function called hello() that outputs the statement "Hello World" and then call that function
def hello():
"Hello World!"
hello()
Fix the code:
num = 10
if num greater than or equal to 5print(Big)
correct:
num = 10
if num >= 5:
print("Big")
What does % do in Python
Who created Python?
Guido van Rossum