Skip to content

Python program that allows the user to play the lottery.

Notifications You must be signed in to change notification settings

MegKam0211/Lotto_Num

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Lotto_Num

Python program that allows the user to play the lottery.

Generate a random two digit number (between 10 and 99) this number will be the lottery number.

Ask the user to enter any two digit number this will be the user's guess.

Get first and second digit from the two digit lottery number.

Get the first and second digit from the user's guess.

Print out the generated lottery number.

If the user's guess matches the lottery number exactly, print out "Congratulations you have an exact match, you win R10 000.00" (i.e. if the user enters 12 and the lottery number is 12)

If the user's guess matches the lottery numbers, but are in the wrong order print out "Congratulations you have all digits, you win R5 000.00" (i.e. if the user enters 48 and the lottery number is 84)

If the user guesses one digit correctly print out "Congratulations you have one correct digit, you win R1 000.00" (i.e. if the user enters 27 and the lottery number is 78)

Else print out "Sorry no match"

About

Python program that allows the user to play the lottery.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages