Hello all,
I just made a simple program that any new programmers can learn. I used Python as it's very simple to make and to translate into pseudo code.
I'd recommend starting with Python before learning new languages because you can implement multiple languages within IDLE.
Enjoy!
I just made a simple program that any new programmers can learn. I used Python as it's very simple to make and to translate into pseudo code.
I'd recommend starting with Python before learning new languages because you can implement multiple languages within IDLE.
Enjoy!
Code:
#simple program to ask the user's name and favourite food
import time
#asks for user's name
userName = input("Hello! What is your name? ")
#waits for 1.5 seconds before executing next command
time.sleep(1.5)
#prints the inputted name
print("Hey", userName+", I'm Python!")
#asks user for it's favourite food
favFood = input("What's your favourite food? ")
#if the user inputs 'Pizza' or 'pizza' as their favourite food, the program will reply with 'I love pizza too!'
if favFood == "Pizza" or "pizza":
print("I love pizza too!")
#any other input and the program will reply with the inputted food and 'is pretty good too.'
else:
print(favFood,"is pretty good too.")
#waits for 3 seconds before executing next command
time.sleep(3)
#the program closes itself
exit()