Class 12th CBSE
Write a Program to enter two number and print the arithmetic Operator like +,-,*,/,// and %.
Solution: –
result=0 while True: x = float(input("Enter the First Value :- ")) y = float(input("Enter the Second Value :- ")) op = input("Enter any one operator of your choice :- (+,-,*,/,//,%,**) ") if op == '+': result = x + y elif op == '-': result = x-y elif op=='*': result =x*y elif op== '/': # Float Division result = x/y elif op=='//': # Integer Division result = x//y elif op == '%': result = x%y elif op=='**': result = x**y else: print("Please Enter proper choice..... ") break #exit(0) print("The result is :- ",result)

Fun & Easy to follow

Works on all devices

Your own Pace

Super Affordable
Popular Videos

UX for Teams
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer

SEO & Instagram
Learn the basics and a bit beyond to improve your backend dev skills.

Chris Matthews
Designer