a random number between 1 and 5. If they guess right, they get 10 points added to their score, and they lose 1 point for an

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 30PE
icon
Related questions
Question

code for python:

 

Write a program that asks the user to guess a random number between 1 and 5. If they guess right, they get 10 points added to their score, and they lose 1 point for an incorrect guess. Give the user
    five numbers to guess and print their score after all the guessing is done. Also, keep track of the number of right & wrong guesses.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning