Python Forum
Supposedly simple program not working! Please help!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supposedly simple program not working! Please help!
#5
As I see it, 3 ways come to mind to collect "y", depending on what type of number you expect (i.e.: integer, float, complex or any of the 3). You then need to test if the user entered a number or a non-number.

Once you resolve the issue of "string" vs. "numeric", and you say you have no limitations, be sure and read Python's built in math library.

A final (very stern) request, break yourself of the habit of using single letter variables. Python strongly encourages descriptive names, whether it be variables, functions, classes, etc.
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
RE: Supposedly simple program not working! Please help! - by sparkz_alot - Feb-20-2018, 08:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using If Statements Instead of While Loop in Simple Game Program new_coder_231013 5 3,253 Dec-14-2021, 12:23 AM
Last Post: supuflounder
  Enigma Program not working properly npd29 3 2,118 May-01-2020, 10:37 AM
Last Post: pyzyx3qwerty
  Simple IF statement not working as intended gortexxx 2 2,843 May-17-2018, 07:54 PM
Last Post: gortexxx
  Simple Eight-Puzzle not working! BenjaminDJ 2 3,248 May-04-2018, 12:17 PM
Last Post: BenjaminDJ
  Simple Python program not working AudioKev 3 3,263 Jan-23-2018, 09:57 PM
Last Post: Larz60+
  GTIN code validation program not working! AnonDxZ 1 2,838 Nov-29-2017, 11:25 PM
Last Post: Prrz

Forum Jump:

User Panel Messages

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