Python Forum
First program feedback
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
First program feedback
#2
Ok. Its been some time since you've posted this but still here is your feedback.
Here is the output I got for entering a wrong password (is it meant to do that?)
Please enter password
hello
Incorrect password. Try again. The number of attempts remaining is 3
swordfish
Incorrect password. Try again. The number of attempts remaining is 2
swordfish
Incorrect password. Try again. The number of attempts remaining is 1
swordfish
Access Blocked
Access granted
>>> 
Also, you can do this instead. for line 1 and 6
>>> input('Enter something: ')
Is pretty much the same as

>>> print('Enter something: ')
>>> input()
The while loop in line 9 is not required. You could just use an if statement like this

if n == 1:
    print('Access Blocked')
Other than that I don't see anything that looks off.
Now one thing I will say is that in the second while loop at line 5, it seems to me that you need to check the password to see if it's entered correctly but that's just me the question could have been different.

Keep it up :)
Reply


Messages In This Thread
First program feedback - by xyzabc12310000 - Mar-12-2018, 10:54 AM
RE: First program feedback - by tannishpage - Mar-21-2018, 09:59 AM
RE: First program feedback - by xyzabc12310000 - May-20-2018, 05:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Feedback on my first program? jibby 6 4,655 Jul-16-2018, 08:42 AM
Last Post: WolfWayfarer
  I need some feedback on this program tannishpage 3 3,086 Mar-22-2018, 05:31 AM
Last Post: tannishpage

Forum Jump:

User Panel Messages

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