Outcomes:
Red - You will be able to copy a program that uses a variable
Amber - You will be able to identify and explain what a variable is
Green - You will be able to independently create a simple program that uses variables
Main Task
print ("Hello")
name = input ("What's your name?")
print ("Hello " + name)
x = int(input ("please give me a number "))
y = int(input ("Please give me another number "))
print (x + y)
place = input ("Where are you from? ")
work = input ("So " + name + " from " + place.title() + ", what do you do for work? ")
age = input ("What is your age?")
if type(age) == int:
else:
print ("That's not a number!!")
if int (age) <= 60:
print ("How young!")
Save the code into your Python folder and call it age
Can you add to this code???
EXTENSION TASK (Click on the image below):
No comments:
Post a Comment