DAY 9(CODE INFINITY)

Let's do something interesting Today I know I am little boring these days reason for this is I only talk about the topic , give you the code and output of it . This makes blog boring or maybe some non - tech readers may find this non interesting so I thought about it and find a solution that after every two days we do interesting activities like we make programs on some daily use things .....so our Today's activity is to make calculator in python you can also try yourself or can take help with the code which is given below:

#create calculator

x=int(input("Enter value of x: "))

y=int(input("Enter value of y: "))

print("The value of" ,x, "+",y, "is" ,x+y)

print("The value of" ,x, "-" ,y, "is" ,x-y)

print("The value of" ,x, "*" ,y, "is" ,x*y)

print("The value of" ,x, "/",y, "is" ,x/y)

print("The value of" ,x, "%" ,y, "is" ,x%y)

print("The value of" ,x, "//" ,y, "is" ,x//y)

Screenshot of How it goes:

calculator

Link of the repel:
https://replit.com/@shwetaantil97/calculator#main.py

#create calculator






Comments

Lusia said…
Oh! Wow we can do Sum,Sub., Multiplication and division with the help of Coding...I have not studied yet.. but it is very useful..👍
Please upload these types of useful Blogs fast! And in same appropriate manner
Thanks CODE INFINITY 👍💯

Popular posts from this blog