Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need a code for this in PYTHON please! Task: Create a simple Guessing Game using Nested If else statements file Name: yourlastname3_4.py Rules: The

i need a code for this in PYTHON please!

Task: Create a simple Guessing Game using Nested If else statements

file Name: yourlastname3_4.py

Rules: The computer generates a random number between 1 and 10 The player gets 2 chances to guess the number If the numbers are equal, the player wins. If the player's number is higher than the winning number tell the player to guess lower If the player's number is lower than the winning number tell the player to guess higher Otherwise, the computer wins

Output Examples:

Guess on 1st try

Welcome to Guess a Number Game You will be granted 2 chances Guess a number between 1 and 10 5 Wow, you won! Congratulations! Game over. goodbye

Guess on 2nd Try

Welcome to Guess a Number Game You will be granted 2 chances Guess a number between 1 and 10 9 Too high, Try again 6 Wow, you won! Game over. goodbye

Loses Game

Welcome to Guess a Number Game You will be granted 2 tries Guess a number between 1 and 10 9 Too high, Try again 1 Your Guess is too low Computer Wins The winning number was 8 Game over. goodbye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions