Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Error
#3
You are trying to multiply to strings together, num1 and num2. You need them to be numeric prior to you calculation, in your case, since you're trying to make a calculator is to make them 'floats':

num1 = float(input())
In fact, save yourself some time and paper with:

num1 = float(input("Hello there, enter your first number"))
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
Python Error - by yonatancc - Jul-18-2017, 08:18 PM
RE: Python Error - by Larz60+ - Jul-18-2017, 08:23 PM
RE: Python Error - by sparkz_alot - Jul-18-2017, 08:26 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020