External Exam Download Resources Web Applications Games Recycle Bin

Input Output

hello world.py

print("Hello World")


input.py

user = input("What is your name?")
print("Hi " + user)


  1. Write a program that prints "My Kitchen Rules" to the screen

  2. Create a piece of code that adds "ly" to the end of an input word. So if i input the word "Swift", your program will print "Swiftly".

  3. Write a program that asks for a user name, and then welcomes the user to Python, e.g. "Hi Joshi, and welcome to Python!"

  4. Ask a user to input their favourite FOOD. Then print "I love FOOD as well!", where FOOD was the value of the input taken from the user

  5. Ask the user for their EMAIL and CREDITCARDNUMBER (store these in variables of the same name). Then print out a receipt and add in the values for email address and credit card number where the variables are shown:
    Tuckshop Receipt
    ****************
    Email address: EMAIL
    Chicken Nuggets x 1
    Coke x 1
    Payment details: CREDITCARDNUMBER
    ****************