Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 14th, 2005, 11:49 AM   #11
kvorshk
Newbie
 
Join Date: Apr 2005
Posts: 7
Rep Power: 0 kvorshk is on a distinguished road
Talking

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.
kvorshk is offline   Reply With Quote
Old Apr 14th, 2005, 11:56 AM   #12
kvorshk
Newbie
 
Join Date: Apr 2005
Posts: 7
Rep Power: 0 kvorshk is on a distinguished road
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?
kvorshk is offline   Reply With Quote
Old Apr 14th, 2005, 12:20 PM   #13
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 439
Rep Power: 5 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
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

peace_of_mind is offline   Reply With Quote
Old Apr 14th, 2005, 12:20 PM   #14
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
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.
Sane is offline   Reply With Quote
Old Apr 15th, 2005, 9:30 AM   #15
kvorshk
Newbie
 
Join Date: Apr 2005
Posts: 7
Rep Power: 0 kvorshk is on a distinguished road
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.
kvorshk is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:41 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC