Write a simple program that takes some user input. If you can’t handle user input yet, set some predefined variables. The program should ask for username and password (you can ask for numbers if you want) and compare them to two predefined variables. If you user gives the correct answer. Print “Correct” and exit the program. If the variables doesn’t match print “Incorrect” and exit the program.

Language: Any
Difficulty level: Very easy.
Estimated time: 5-10 minutes


This entry was posted in Basic control flow. Bookmark the permalink.