How to build a Basic Calculator Using Python Programming Language?

This is how to create a Basic Calculator using Python Programming Language. # This is how to create a calculator using python programming. #Basic calculator by Jojo Parba num1 = float(input("Enter a number: ")) # math operator +, -, / , * math_operator = input("Enter an Operator: ") num2 = float(input("Enter another number: ")) if math_operator == "+": total_addition = num1 + num2 print('{:0,.2f}'.format(total_addition)) elif math_operator == "-": total_subtraction = num1 - num2 print('{:0,.2f}'.format(total_subtraction)) elif math_operator == "*": total_multiplication = num1 * num2 print('{:0,.2f}'.format(total_multiplication)) elif math_operator == "/": total_division = num1 / num2 print('{:0,.2f}'.format(total_division)) else: print("Invalid Operator!")

Lotto 6/42 Winning Combination Number Generator Using Python.

Here is the python code for Lotto 6/42 Lotto Winning combination Generator!

Comments

Popular posts from this blog

Lotto 6/45 Winning Combination Number Generator Using Python.

Lotto 6/55 Winning Combination Generator Using Python.

Lotto 6/58 Winning Combination Generator Using Python Programming.

Blog Categories