In :
def menu():
print("1. Addition") #This will be my first option
print("2. Subtraction")#This will be my second option
print("3. Multiplication")#This will be my third option
print("4. Floor Division")#This will be my fourth option
print("5. Remainder")#This will be my fifth option
print("6. Exit")#This will be my exit option
myChoice = input("Enter what you want to do: ")#My first variable must contain one of the above options.

if myChoice == "1":#It will go to my first option under the function add which will add two numbers.
if myChoice == "2":#It will go to my second option under the function sub which will subtract two numbers.
sub()

if myChoice == "3":#It will go to my third option under the function multi which will multiply two numbers.
multi()

if myChoice == "4":#It will go to my fourth option under the function fdiv which will divide two numbers
fdiv()

if myChoice == "5":#It will go to my fifth option under the function remain which find the modulo of two numbers
remain()

if myChoice == "6":
print("goodnight")#It will say goodnight and end the program
else:

#This program will add any 2 numbers that I enter

#Here I will enter my first number, it will be a floating point number
firstNumber = float(input("Enter a number ==>"))

#Now I will enter my second number
secondNumber = float(input("Enter a number ==>"))
#Here is the variable that will show my sum
sum = firstNumber + secondNumber

#Now I will print my final statement with the formula
print(firstNumber,"plus", secondNumber, "equals", sum)

def sub():
#My subtraction program
#This program will subtract any 2 numbers that I enter

#Here I will enter my first number, it will be a floating point number
firstNumber = float(input("Enter a number ==>"))

#Now I will enter my second number
secondNumber = float(input("Enter a number ==>"))
#Here is the variable that will show my difference
difference = firstNumber - secondNumber

#Now I will print my final statement with the formula
print(firstNumber,"minus", secondNumber, "equals", difference)

def multi():
#My Multiplication program
#This program will multiply any 2 numbers that I enter

#Here I will enter my first number it will be a floating point number
firstNumber = float(input("Enter a Number ==> "))

#Now I will enter my second number
secondNumber = float(input("Enter a Second Number ==> "))

#Here is the variable that will show my product
product = firstNumber * secondNumber

#Now I will print out my final statement with the formula
print(firstNumber,"times", secondNumber, "equals", product)

def fdiv():
#My Floor Division Program
#This program will divide any 2 numbers that I enter

#Here I will enter my first number it will be a floating point number
firstNumber = float(input("Enter a Number"))

#Now I will enter my second number
secondNumber = float(input("Enter a Second Number"))

#Here is the variable that will show my quotient
quotient = firstNumber // secondNumber

#Now I will print my final statement with the formula
print(firstNumber, "divided by", secondNumber, "equals", quotient)

def remain():
#My Remainder Program
#This program will find the remainder

#Here i will enter my first number it will be a floating point number
firstNumber = float(input("Enter a Number"))

#Now I will enter my second number
secondNumber = float(input("Enter a Second Number"))

#Here is the variable that will show my modulo
modulo = firstNumber % secondNumber,

#Now I will print my final statement with the formula
print(firstNumber,"modulo", secondNumber, "equals", modulo)


1. Addition
2. Subtraction
3. Multiplication
4. Floor Division
5. Remainder
6. Exit
Enter what you want to do: 6
goodnight

In [ ]: