Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Let's code a simple python calculator! ๐Ÿงฎ
Play lesson

Python tutorial for beginners ๐Ÿ - Let's code a simple python calculator! ๐Ÿงฎ

4.0 (0)
8 learners

What you'll learn

This course includes

  • 14.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#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")

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere