![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Apr 2005
Posts: 7
Rep Power: 0
![]() |
Sane, this is really just an exorcise I am learning to code. Ive been wasting enough time in front of computers long enough that I should know how to write some form of computer language other than html. I liked python after looking at many different types of code. One question though on line 12 you put count = 3 what does that line do? Even after debugging Im not quite sure.
|
|
|
|
|
|
#12 |
|
Newbie
Join Date: Apr 2005
Posts: 7
Rep Power: 0
![]() |
You know what sane, no more than 2 minutes after my last post, I had finished looking over the code one more time and I think I get what line 12 does. It forces the count so that the program stops checking the count and reprinting the line. Am I close?
|
|
|
|
|
|
#13 |
|
Professional Programmer
|
The loop is set to run 3 times (max_count). Setting count to 3 after the correct password is given exits the loop.
__________________
Amateurs built the ark Professionals built the Titanic |
|
|
|
|
|
#14 |
|
Programming Guru
![]() |
Yes, congrats. Because in order for the while to loop, count must be < then max_count. So making count 3 forces the loop to exit. My example isn't exactly what you wanted though. If you're still having a little trouble, I'll be glad to show you how I'd do it.
And I applaud your overcoming of wasting time on the Computer. I see far too many people wasting what could be very valuable time, and too many unambitious people with no motivation to drive them against this factor. |
|
|
|
|
|
#15 |
|
Newbie
Join Date: Apr 2005
Posts: 7
Rep Power: 0
![]() |
You guys rock youve been more than help all your ideas were great, and because of you guys I think that Im actually on my way to learning how to code. Thank you.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|