160 likes | 337 Views
Python Poetry. Web page http://bit.ly/pythonpoetry Or https://slp.somerset.gov.uk/cypd/elim/somersetict/Computing_curriculum_ks3_ks4/Python/pythonpoetry.mht. Challenge 1 -mash1.
E N D
Python Poetry Web page http://bit.ly/pythonpoetry Or https://slp.somerset.gov.uk/cypd/elim/somersetict/Computing_curriculum_ks3_ks4/Python/pythonpoetry.mht
Challenge 1 -mash1 print("Mashed potatoes on the ceiling.")print("Green beans on the floor.")print("Stewed tomatoes in the corner.")print("Squash upon the door.")
Challenge 2 –mash2 Add a line in here print("Mashed change here on the ceiling.")print("Green beans on the floor.")print("Stewed tomatoes in the corner.")print("Squash upon the door.") veg = "Carrots" print("Mashed ",veg," on the ceiling.")
Challenge 2 –mash2 veg=“Carrots” print("Mashed “,veg,” on the ceiling.")print("Green beans on the floor.")print("Stewed tomatoes in the corner.")print("Squash upon the door.")
Challenge 3 –mash3 veg="Carrots" print("Mashed",veg, "on the ceiling.")print("Green change here on the floor.")print("Stewed change herein the corner.")print(change here upon the door.") # for exampleprint("Green",veg,"on the floor.") print(veg,"on the door.")
Challenge 3 –mash3 veg="Carrots" print("Mashed ",veg, “ on the ceiling.")print("Green “,veg, “ on the floor.")print("Stewed “,veg, “in the corner.")print(veg, “upon the door.")
Challenge 4 –mash4 Change here print("Mashed",veg, "on the ceiling.")print("Green",veg,"onthe floor.")print("Stewed",veg,"inthe corner.")print(veg,"uponthe door.") veg = input("Type in the name of a vegetable ")
Challenge 4 –mash4 Veg=input(“Type in the name of a vegetable”) print("Mashed",veg, "on the ceiling.")print("Green",veg,"onthe floor.")print("Stewed",veg,"inthe corner.")print(veg,"uponthe door.")
Challenge 5 –mash5 # for exampleveg1=”carrot” veg2="cabbage"veg3="radish" veg4=”lettuce” Change here Change here Change here Change here print("Mashed", Change here, "on the ceiling.")print("Green", Change here,"onthe floor.")print("Stewed", Change here,"inthe corner.")print(Change here,"uponthe door.") # for exampleprint("Green",veg2,"on the floor.")
Challenge 5 –mash5 veg1=“carrott” veg2=“cabbage” veg3=“radish” veg4=“lettuce” print("Mashed", veg1, "on the ceiling.")print("Green",veg2,"on the floor.")print("Stewed", veg3,"in the corner.")print(veg4,"upon the door.")
Challenge 6 –mash6 # To use random numbersimport random Change here Change here Change here print("Mashed",veg, "on the ceiling.")print("Green",veg,"onthe floor.")print("Stewed",veg,"inthe corner.")print(veg,"uponthe door.") veglist = ["Beans","Broccoli"] veg = random.choice(veglist)
Challenge 6 –mash6 # To use random numbers import random veglist=[“beans”,”brocolli”,”cabbage”,”cauliflower”,.] veg=random.choice(veglist) print("Mashed",veg, "on the ceiling.")print("Green",veg,"onthe floor.")print("Stewed",veg,"inthe corner.")print(veg,"uponthe door.")