In: Computer Science
Write a simple Python program that will generate two random between 1 and 6 ( 1 and 6 are included). If the sum of the number is grader or equal to 10 programs will display “ YOU WON!!!”. if the sum is less than 10, it will display “YOU LOST”. After this massage program will ask users a question: “if you want to play again enter Y. if you want to exit enter ‘N’) If the user enters Y they will continue to play and if they enter N the program terminates.
Have a look at the below code. I have put comments wherever required and also ran the program with a sample input, you can see the output in the console.
Happy Learning!