Python Forum
Looking for critique on my code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for critique on my code
#10
That link is really useful, thanks. I'll spend some time to figure out the more proper ways of formatting things. The lsit thing sounds interesting, I'll take a look at that as well.

(May-02-2017, 05:13 PM)nilamo Wrote:
Quote:
        if(a==0):
            print("\nThe \"A\" coefficient can't be equal to zero.\n")
        if((a==0)&(CanCalc==False)):
            print("and")
        if(CanCalc==False):
            print("\nYou can't enter letters.\n")

Why not...
        if(a==0):
           print("\nThe \"A\" coefficient can't be equal to zero.\n")
           if(CanCalc==False):
               print("and")
               print("\nYou can't enter letters.\n")

I have the if statement with the variable CanCalc separate from the other error detection, so that they can display separately as well as simultaneously.
Reply


Messages In This Thread
Looking for critique on my code - by zeevo234 - May-02-2017, 04:39 PM
RE: Looking for critique on my code - by nilamo - May-02-2017, 04:39 PM
RE: Looking for critique on my code - by zeevo234 - May-02-2017, 04:42 PM
RE: Looking for critique on my code - by nilamo - May-02-2017, 04:45 PM
RE: Looking for critique on my code - by buran - May-02-2017, 04:47 PM
RE: Looking for critique on my code - by zeevo234 - May-02-2017, 04:57 PM
RE: Looking for critique on my code - by volcano63 - May-02-2017, 05:19 PM
RE: Looking for critique on my code - by nilamo - May-02-2017, 05:13 PM
RE: Looking for critique on my code - by zeevo234 - May-02-2017, 05:18 PM
RE: Looking for critique on my code - by zeevo234 - May-02-2017, 05:21 PM
RE: Looking for critique on my code - by nilamo - May-03-2017, 04:29 PM
Need help figuring out prod - by zeevo234 - May-03-2017, 04:13 PM

Forum Jump:

User Panel Messages

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