Question

Game Time You have a little free time on your hands and decide to create a...

Game Time

You have a little free time on your hands and decide to create a simple game. Utilize the design tools that you have learned this week to design and program a very simple game. Examples: Movie Trivia, Guess a number between 1-10, Dice, etc. Note: Avoid games with lots of complex combinations like card games, i.e. poker, unless you desire a surmountable challenge. The real goal is for you to demonstrate the use of the design tool to reduce the amount of time spent coding and error fixing.

For this project:

You will submit your python code in either the original .py file, or copied into a .txt file.

You will also submit evidence of the design tool being used to organize the logic of your program. This can be a screenshot, flowchart, hand-drawn, pseudocode, etc. uploaded as a Word DOC or DOCX.

A screenshot of your code having been executed (run). How to Take a Screenshot

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import random

try_number = 0

#menu for the user

print("Welcome to the GUESSING GAME !!!!!")

print("RULES")

print("The computer will think a number between 1-20")

print("You got 8 chances to guess the number")

print('Enter the Player Name ')

player_name = input()

original_number = random.randint(1, 20) #the number to guess

print('Hi, ' + player_name + ', Lets see if you can say what i am guessing')

#total 8 chances

while try_number < 8:

print('Take a Guess.') #asking for user guess

user_try = input()

user_try = int(user_try)

try_number = try_number + 1

if user_try < original_number: #if guess is less than the number

print('The guess is too low.')

if user_try > original_number: #if guess is higher than the number

print('The guess is too high.')

if user_try == original_number: #if it matches

break

if user_try == original_number: #if match is there

try_number = str(try_number)

print('Great, ' + player_name + '! You got it correct in ' + try_number + ' guesses!')

if user_try != original_number: #if no match

original_number = str(original_number)

print('SorryNope. '+player_name+' The number I was thinking of was ' + original_number)

OUTPUT

RULES The computer will think a number between 1-20 You got 8 chances to guess the number Enter the Player Name Michael Hi,

Add a comment
Know the answer?
Add Answer to:
Game Time You have a little free time on your hands and decide to create a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can you send the code and the screenshot of it running? 1) Create a PYHW2 document...

    Can you send the code and the screenshot of it running? 1) Create a PYHW2 document that will contain your algorithms in flowchart and pseudocode form along with your screen shots of the running program. 2) Create the algorithm in both flowchart and pseudocode forms for the following two functions: A. Write a Python function that receives a real number argument representing the sales amount for videos rented so far this month The function asks the user for the number...

  • Your mission in this programming assignment is to create a Python program that will take an...

    Your mission in this programming assignment is to create a Python program that will take an input file, determine if the contents of the file contain email addresses and/or phone numbers, create an output file with any found email addresses and phone numbers, and then create an archive with the output file as its contents.   Tasks Your program is to accomplish the following: ‐ Welcome the user to the program ‐ Prompt for and get an input filename, a .txt...

  • Solve the Sudoku game using the inputs available online. You can create your own input file...

    Solve the Sudoku game using the inputs available online. You can create your own input file as long is it is in the same format as the sample files given. Lookup online the rules for Sudoku if you are uncertain. You will be required to use concepts we have gone over in the class. Do not use techniques we have not discussed! Items that are required: Read in game board from a .txt file. Write out solution to game board...

  • Create the game hangman using c code: Program description In the game of hangman, one player...

    Create the game hangman using c code: Program description In the game of hangman, one player picks a word, and the other player has to try to guess what the word is by selecting one letter at a time. If they select a correct letter, all occurrences of the letter are shown. If no letter shows up, they use up one of their turns. The player is allowed to use no more than 10 incorrect turns to guess what the...

  • You are free to create anything for your final project. It will count as a learning...

    You are free to create anything for your final project. It will count as a learning of your python course. What you have learned so far. Make sure your code covers all of the following things. See rubric for grading. Use the concepts of object-based programming—classes, objects, and methods Draw two-dimensional shape Use the RGB system to create colors in graphics applications and modify pixels in images Develop recursive algorithms to draw recursive shapes Write a nested loop to process...

  • This assignment uses functions, files, and strings. Enough flexibility is provided for you to apply your...

    This assignment uses functions, files, and strings. Enough flexibility is provided for you to apply your knowledge of basic C++ programing to develop your solution. Develop a functional flowchart and then write a C++ program to solve the following problem. 1. Create a text file named file1.txt and write your brand of car (like Honda, Toyota, etc) in the file. You will be reading the name of the file from the keyboard as a string, using the string class. Your...

  • Design and implement a class for a one person guessing game as described on page 30,...

    Design and implement a class for a one person guessing game as described on page 30, Chapter 1, Programming Problem 7 of the textbook. CSCI 2421 HW1.jpg Submit header file guess.h, implementation file guess.cpp, main function file main.cpp that asks initial seed number, and prints three sequential numbers generated by the program. You need to include a makefile, and Readme file pseudocode version UF comments in your code. 6. Exercises 6, 7, and 8 ask you to specify methods for...

  • Simple JavaScript and HTML: You'll create a simple word guessing game where the user gets infinite...

    Simple JavaScript and HTML: You'll create a simple word guessing game where the user gets infinite tries to guess the word (like Hangman without the hangman, or like Wheel of Fortune without the wheel and fortune). Create two global arrays: one to hold the letters of the word (e.g. 'F', 'O', 'X'), and one to hold the current guessed letters (e.g. it would start with '_', '_', '_' and end with 'F', 'O', 'X'). Write a function called guessLetter that...

  • In this programming exercise, you will create a simple trivia game for two players. The program...

    In this programming exercise, you will create a simple trivia game for two players. The program will work like this: Starting out with player 1, each player gets a turn at answering 5 trivia questions. (There should be a total of 10 questions.) When a question is displayed, 4 possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, he or she earns a point. After answers have been selected...

  • java In this project you will implement a trivia game. It will ask random trivia questions,...

    java In this project you will implement a trivia game. It will ask random trivia questions, evaluate their answers and keep score. The project will also have an administrative module that will allow for managing the question bank. Question bank management will include adding new questions, deleting questions and displaying all of the questions, answers and point values. 2. The project can be a GUI or a menu based command line program. 3. Project details 1. Create a class to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT