Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 3 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 15 Sep 2017 My Price 8.00

reusing the function

Modify the Guess My Number Chapter Project from Chapter 3 by reusing the function ask_number() from the Tic-Tac-Toe Chapter Project from this chapter. Replace the code in Guess My Number that asks the player for a guess with a call to ask_number( ).

Here is the original Guess My Number game:

import random

guessesTaken = 0

print("Hello what is your name?")
name = input()

number = random.randint(1,20)
print("Well",name,",I am thinking of a number between 1 and 20.")

while guessesTaken < 6:
    print("Take a guess")
    guess = input()
    guess = int(guess)

    guessesTaken = guessesTaken + 1

    if guess < number:
        print("your guess is to low")

    if guess > number:
        print("Your guess is to high")
    if guess == number:
        break

if guess == number:
    guessesTaken = str(guessesTaken)
    print("Good job",name,"You guessed my number in",guessesTaken,"guesses!")

if guess != number:
    number = str(number)
    print("Nope, the number I was thinking of was",number)

Answers

(5)
Status NEW Posted 15 Sep 2017 03:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)