Python Program #30 - Make a Simple Calculator in Python

preview_player
Показать описание
Python Program #30 - Make a Simple Calculator in Python
In this video by Programming for beginners we will see Python Program to Make a Simple Calculator in Python for beginners series.
Python programming language and program is very easy to learn for students and professionals.

In this program, we ask the user to choose an operation for Simple calculator such as add, subtract, multiply and divide.
Then user enters 2 numbers and result will be displayed based on the operation selected.

==========

Python Programs for Beginners Playlist:

Python Tutorial for Beginners Playlist:

Java Tutorial for Beginners Playlist:

All Java Programs Playlist:

Python is a computer programming language often used to build websites and software, automate tasks, and conduct data analysis. Python is a general-purpose language, meaning it can be used to create a variety of different programs and isn't specialized for any specific problems.
It is very important for students and professionals to learn python programming language that will help you to achieve many tasks easily and to build softwares.

YouTube Gears:

#PythonTutorial #PythonProgram #PythonForBeginners #Programming #PythonTutorialForBeginners

============================
LIKE | SHARE | COMMENT | SUBSCRIBE

Thanks for watching :)
Рекомендации по теме
Комментарии
Автор

Thanks bro I see your video at 11 pm at night and tomorrow is my computer practical, so thanks 😊❤❤

ARTOLOGY-
Автор

I made my own code before I watched your video. Mine’s a bit smaller:

mode = input("Choose an operator (+, -, *, /, ^): ")

first = float(input("First: "))
second = float(input("Second: "))

if mode == "+":
sum = first + second
print(sum)
elif mode == "-":
sum = first - second
print(sum)
elif mode == "*":
sum = first * second
print(sum)
elif mode == "/":
sum = first / second
print(sum)
elif mode == "^":
sum = first ** second
print(sum)
else:
print("Wasn't a compatible operator to begin with.")

RadRudner
Автор

print("add")
print("subtract")
print("multiply")
print("divide")
x = input("choose an operation: ")
if x in ["add", "subtract", "multiply", "divide"]:
number1 = int(input("type a number :"))
number2 = int(input("type a number :"))
if (x == ("add")):
print(number1+number2)
elif (x ==("subtract")):
print(number1-number2)
elif (x == ("multiply")):
print(number1 * number2)
elif (x == ("divide")):
print(number1 // number2)
else:
print("invalid entery")

Waelalshami
Автор

How do you reuse your answer on an operation to get another answer

dennisowusu