Python Forum
Shorting Code down - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Shorting Code down (/thread-426.html)

Pages: 1 2


RE: Shorting Code down - Mekire - Oct-10-2016

(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.


RE: Shorting Code down - gh01 - Oct-10-2016

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 .


RE: Shorting Code down - sparkz_alot - Oct-10-2016

(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.