Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Squares and Cubes Calculator
- num = int(input("Enter your number: "))
- print("\nEnter 1 for squaring your inputted number.")
- print("Enter 2 for cubing your inputted number.")
- opr = int(input("\nEnter your desired request number: "))
- if opr == 1:
- sqr = (num*num)
- print("The square of your number is: ",sqr)
- elif opr == 2:
- cube = (num*num*num)
- print("The cube of your number is: ",cube)
- else:
- print("You inputted an invalid request.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement