1 / 12

Python Poetry

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.

hertz
Télécharger la présentation

Python Poetry

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Python Poetry Web page http://bit.ly/pythonpoetry Or https://slp.somerset.gov.uk/cypd/elim/somersetict/Computing_curriculum_ks3_ks4/Python/pythonpoetry.mht

  2. 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.")

  3. 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.")

  4. 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.")

  5. 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.")

  6. 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.")

  7. 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 ")

  8. 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.")

  9. 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.")

  10. 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.")

  11. 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)

  12. 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.")

More Related