Confused with Python and Need Help Debugging
Moderators: kgudger, bfinio, Moderators
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
Thanks a lot! i'm going to make a few final touch-ups to the program this thursday and Friday. I'll tell you if I get any troubles and tell you how it's going.
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
Okay! After re-reading the Science Buddies project outline, I only got confused in one part. When you talk about the Method 4 flowchart, it talks about counters... What do you mean by counters and of what importance are they in the flowchart?
-
- Posts: 496
- Joined: Thu Nov 20, 2014 1:35 pm
- Occupation: Science Buddies content developer
- Project Question: N/A
- Project Due Date: N/A
- Project Status: Not applicable
Re: Confused with Python and Need Help Debugging
The counter is simply a variable that keeps track of how many times you've done something or how many times you've been through a loop. People also refer to them as loop counters or event counters sometimes.
Here's one way to count to 10-
loopcounter = 1
while (loopcounter <= 10):
print ("Loop "+str(loopcounter)) # These two lines would be indented
loopcounter = loopcounter + 1
loopcounter ends up having 10 values, the numbers from 1 to 10.
In Method 4, the counters are word1count, punc_count and word_count. word1count counts from 0 to 434, punc_count counts from 0 to 25 435 times, and word2count counts from 0 to 434 as well, but it does it 435*26 or 11,310 times. The total number of loops then, assuming the test fails is 4,919,850 times. Does that make sense?
Here's one way to count to 10-
loopcounter = 1
while (loopcounter <= 10):
print ("Loop "+str(loopcounter)) # These two lines would be indented
loopcounter = loopcounter + 1
loopcounter ends up having 10 values, the numbers from 1 to 10.
In Method 4, the counters are word1count, punc_count and word_count. word1count counts from 0 to 434, punc_count counts from 0 to 25 435 times, and word2count counts from 0 to 434 as well, but it does it 435*26 or 11,310 times. The total number of loops then, assuming the test fails is 4,919,850 times. Does that make sense?
-
- Posts: 496
- Joined: Thu Nov 20, 2014 1:35 pm
- Occupation: Science Buddies content developer
- Project Question: N/A
- Project Due Date: N/A
- Project Status: Not applicable
Re: Confused with Python and Need Help Debugging
Sorry - cut/paste error.
It should have said "In Method 4, the counters are word1count, punc_count and word2count."
It should have said "In Method 4, the counters are word1count, punc_count and word2count."
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
great, thank you!
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
Okay.... One more issue is that now I'm comparing the math with the tables and all, but when I look to see how much time it took for the program it guessed... It said 0.0 seconds. Is this supposed to happen? Because the program made 21 guesses (I'm using method 1)
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
Actually, no... What I mean to say is is it possible to put the rate of guesses/second down so that it's 1 guess/second? It's much easier to compare that way.
-
- Posts: 14
- Joined: Thu Nov 20, 2014 6:08 pm
- Occupation: Student
- Project Question: In my science project, I'm trying to make a password-guessing program but am having difficulties with Python.
- Project Due Date: December 8th
- Project Status: I am conducting my experiment
Re: Confused with Python and Need Help Debugging
Oh! And just to say... I was able to make an improvement to the program. For method 2, I added all the symbols (!@#$%^&*-+) to the wheel so it could also try those.
-
- Posts: 10
- Joined: Mon Dec 22, 2014 9:17 am
- Occupation: Student - 9th
- Project Question: Python Password Cracker
- Project Due Date: n/a
- Project Status: I am conducting my research
Re: Confused with Python and Need Help Debugging
I also had two questions:
1) What is different about password6?
2) How much would I have to change to crack a user-entered password?
Thank you in advance for any help.
1) What is different about password6?
2) How much would I have to change to crack a user-entered password?
Thank you in advance for any help.
-
- Moderator
- Posts: 908
- Joined: Fri Jun 20, 2014 4:42 pm
- Occupation: Biostatistician/Data Scientist
- Project Question: Interested in volunteering as an expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: Confused with Python and Need Help Debugging
Hi Coolio12,
Welcome to Science Buddies!
I'm thinking that it would be easier for us to help you if you started a new thread for your question. Otherwise, your question just gets buried in the conversation about the original student's questions.
Also, it would help us help you if you provided more detail about your project.
Good luck!
Welcome to Science Buddies!
I'm thinking that it would be easier for us to help you if you started a new thread for your question. Otherwise, your question just gets buried in the conversation about the original student's questions.
Also, it would help us help you if you provided more detail about your project.
Good luck!