Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shorting Code down
#11
(Oct-10-2016, 06:55 PM)gh01 Wrote: yes something like that but i also need it so it can have a character counting system intergrated into it and it can have a password up to 6-12 characters
Well it already tells you if the password is less than 6.  Pretty simple to also invalidate greater than 12.
Quote:or is my system good enough
Up to you.  It isn't even clear to me if your code doesn't have logical errors the way it is written.  It isn't what I would want to see if I were your teacher.
Reply
#12
thanks for your help but the main objective was to get the code done thats all i care about then at the end i would tidy up .
Reply
#13
(Oct-10-2016, 06:55 PM)gh01 Wrote: yes something like that but i also need it so it can have a character counting system intergrated into it and it can have a password up to 6-12 characters

or is my system good enough

"Is it good enough" is a relative statement. Good enough for who? You? Your instructor? Are you able to use functions or possibly even classes? Looking at the first several lines, there are a few 'elif' statements that could be combined into one.

Generally speaking, if you've learned condition statements, your instructor will want to see you use them, if you've learned functions, the instructor will want to see them used and so on.
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


Forum Jump:

User Panel Messages

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