Python Program to Make a Simple Calculator | Complete Tutorial

preview_player
Показать описание


WsCube Tech is a leading Web, Mobile App & Digital Marketing company, and institute in India.

We help businesses of all sizes to build their online presence, grow their business, and reach new heights.

All the courses are job-oriented, up-to-date with the latest algorithms and modules, fully practical, and provide you hands-on projects.

📞 For more info about the courses, call us: +91-7878985501, +91-9269698122

✅ CONNECT WITH THE FOUNDER (Mr. Kushagra Bhatia) -

Connect with WsCube Tech on social media for the latest offers, promos, job vacancies, and much more:

--------------------------------------| Thanks |---------------------------
#python #pythontutorials #pythonprogramming
Рекомендации по теме
Комментарии
Автор

😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments.

wscubetech
Автор

Thank you for a wonderful process of coding.

edforthweasley
Автор

Very good. Thanks a lot. Your presentation is very good. Specially run in step by step such that I could correct my program. You presented in easily understable way. ❤😂

RameshPal-cdcs
Автор

num1=int(input("First number:"))
num2=int(input("Second number:"))
opr=input("Enter the operator(+, -, *, /)")
if opr =="+":
print(num1+num2)
if opr =="-":
print(num1-num2)
if opr =="*":
print(num1*num2)
if opr =="/":
print(num1/num2)
if opr!='+' and opr!='-' and opr!='*' and opr!='/':
print('Vul lekhecho')

FLIX
Автор

I am not an expert at coding but i think that for the choice, it would be better to use str input since incase the user accidentally types alphabets instead of 1-4, the result will still be "Invalid Input", Whereas if user enters any alphabet for the choice, the code will result in value error. Correct me if i am wrong please. I am still learning.

pluto
Автор

Guys mine is better
x=int(input(" Number --> "))
z=input(" Operation --> ")
y=int(input(" Number --> "))
print(x, z, y)
if z== "+":
print("=", x+y)
elif z=="-":
print("=", x-y)
elif z=="/":
print("=", x/y)
elif z=="×":
print("=", x*y)
else:
print("put operation like +, -, /, ×")

sachinsharma
Автор

num1 = int(input("Enter first number :"))
operator = input("Enter the (-, +, *, /) :")
num2 = int(input("Enter secound number :"))

if operator == "-":
print("Substraction of num1 and num2 :", num1 - num2)
elif operator == "+":
print("Addition of num1 and num2 :", num1 + num2)
elif operator == "*":
print("Multiplication of num1 and num2 :", num1 * num2)
elif operator == "/":
print("Division of num1 and num2 :", num1 / num2)
else:
print("Enter the right operator")

mystudy
Автор

It will be more beautiful by adding the while loop for infinite loop..

satishdas
Автор

Python ka use karke website
Bnane ka ek singal video bnao please

WinTubeMusic
Автор

what we want to calculate an expression like => 120+12-(10*20) how will we calculate that? will you please make tutorial video on that as well?

shivanisaraiya
Автор

I am weak in programming and recently learning it .

Mister.poor.innocent.
Автор

Are didi ye toh hmne bhi bna liya tha isko apk file me kaise convert kre ye btao.

helloeveryone
Автор

never trust a programmer who code in light mode😅

HEADBOYHERE
Автор

Thank You so Much. Helped a lot. Cleared all my doubts.👍👍.

U_ARMY
Автор

agar choice 5 choose kiya tho return code run nh horha invalid print krne k baad

aniketgaud
Автор

print("Simple Calculator")

x=int(input(" Enter First Number --> "))
z=input(" Enter Desired Operator --> ")
y=int(input(" Enter Second Number --> "))

if z== "+":
print("The Sum of ", x, "+", y, "=", x+y)
elif z=="-":
print("The Diffrence of ", x, "-", y, "=", x-y)
elif z=="/":
print("The Division of ", x, "/", y, "=", x/y)
elif z=="*":
print("The Product of ", x, "x", y, "=", x*y)
else:
print("Invalid Input")

mohammedomersiddiqui
Автор

Why I am not able to use it when I save the file

PrachitiKitey-texw
Автор

imagine our phones calculator is saying us for pressing 1 for calculation
🤔

LG-Alison
Автор

Yrr mere toh output me kuch hi nhi aa rha

vikramsinghrajawat