I am trying to figure out why the website that i have to submit my homework in won't accept this code below as an answer. Redundancy aside, the program seems to work exactly the way it supposed to but i keep getting an error message that says "Checking output Your standard output is not what was expected."
the assignment goes as follows:
"- A password must have at least eight characters.
- A password must consist of only letters and digits.
- A password must contain at least two digits.
Write a program that prompts the user to enter a password and displays valid password if the rules are followed or invalid password otherwise."
Are you supposed to prompt for multiple passwords in a loop? The assignment doesn't ask for that.
Sometimes you don't indicate anything:
$ ./foo
- A password must have at least eight characters.
- A password must consist of only letters and digits.
- A password must contain at least two digits.
Please enter a password: foo
Invalid password
Please enter a password: abcdefghij1
Please enter a password: abcdefghij1
Please enter a password: foo
Invalid password
the letter of the law approach:
Write a program that prompts the user to enter a password and displays valid password if the rules are followed or invalid password otherwise."
that does not say to write 3 lines of unnecessary text first. Maybe that is breaking the program checker.
Sounds like the automated grading system is expecting output to be in a way different from what you're providing. Perhaps it's case sensitive? e.g. "invalid password".
wow, you were exactly right. The grading system was case sensitive. I got it to work. Thank you all for your help I sincerely appreciate it. I'm new to programming so seeing the support from this community motivates me to keep on learning.