Tuesday 15 August 2017

Tech Leap calc

I went to Tech leap on Monday.  We learnt about how to code an equation. You do this by ...

num1=int(input("what is your first number?"))
num2=int(input("what is your second number?"))
operand=str(input('would you like to add or subtract or divide'))

if operand=="add":
    print("your anser is",num1+num2)
elif operand=="subtract":
    print("your anser is",num1-num2)
elif operand=="diviide":
    print("your anser is",num1/num2)
else:
    print("your anser is",num1*num2)

I can calculate different types of equations. One day I hope to develop my own game.