Free Friday 9/12/25

Today in class I made a WordPress website.

Watched a youtube video on a python project, basic calculator

link: https://www.youtube.com/watch?v=4wGuB3oAKc4

Here is a screenshot:

operator = input("Enter an opertor (+ - * / ):  " )
num1 = float(input("Eter the 1st number: "))
num2 = float(input("Eter the 1st 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")

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top