tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code05:52

Let's code a simple python calculator! 🧮

Bro Code ↗

From the creator

#python #pythontutorial #pythoncourse # Python calculator operator = input("Enter an operator (+ - * /): ") num1 = float(input("Enter the 1st number: ")) num2 = float(input("Enter the 2nd number: ")) if operator == "+": result = num1 + num2 print(round(result, 3)) elif operator == "-": result = num1 - num2 print(round(result, 3)) elif operator == "*": result = num1 * num2 print(round(result, 3)) elif operator == "/": result = num1 / num2 print(round(result, 3)) else: print(f"{operator} is not a valid operator")

Published 2024-08-13 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code