Write a
GIVEN:
Write a program that plays a guessing game with the user. The user should pick a letter, and the computer should try to guess the letter. After each guess, the user should tell the computer whether its guess was too high or too low. With this information, the computer should be able to guess the letter within five tries. The user should be able to give whole words or single upper or lower case letters as responses. c++
Step by stepSolved in 3 steps with 2 images
- May assignment is asking me to build a program in PyChart that makes it possible for the player to visit each room and select the items in that room to fight a giant at the end. In order to win the game you have to collect all of the items from all of the rooms. When I run the code this is the result: Text Adventure Game ***************************Welcome to the Giant text game, Collect all of the items to defeat the Giant!To move: South, North, East, WestTo get items: get ’item name’ ***************************You are in the BasementItem: You see ArmorEnter a move: When I input the direction to go north the next result comes up correctly. However when I tell it to get and item (which is the command written into the code I get this: Invalid direction! Please enter a valid direction. ***************************You are in the BasementItem: You see ArmorEnter a move: This is my complete program code, can someone please tell me what I am doing wrong. #Functions showing goal of game and…arrow_forwardQuestion: You are to write a Java program correctly that will prompt for and read 1 string entered by the user which may contain spaces, and display just the vowels in the string in the order they appear, and all other characters in the order they appear. Be sure to use the same format and wording as in the sample runs in the table below. The vowels are a, e, i, o and u. You can use the loop of your choice to solve the problem.arrow_forward1.Write a Java program of Rock-Paper-Scissors. Two players will input the first equivalent letter. For example: S for Scissor, R for Rock and P for Paper. Then Display the winner with a message such as: "Player 1 Wins" or "Rock breaks Scissors" or "It's a Tie", ETC. Use if-else statements. 2. Given the flowchart below, what does this Flowchart do? Conver the Flowchart into a Java Program using if-else statements. 3. Write a java program that accepts an ordinary number and outputs its equivalent roman numerals. Below is some samples of ordinary number and roman numerals. Ordinary numbers Roman numerals1 I5 V10 X50 L 100 C500 D1000 M If you input ordinary number 2968…arrow_forward
- n this lab, you complete a prewritten Python program for a carpenter who creates personalized house signs. The program is supposed to compute the price of any sign a customer orders, based on the following facts: The charge for all signs is a minimum of $35.00. The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. If the sign is make of oak, add $20.00. No charge is added for pine. Black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering.arrow_forwardCould this please be written in C++ 11, Thanks ! Write a program that calculates how much a person earns in a month if the salary is one penny on the first day, two pennies on the second day, four pennies on the third day, and so on with the daily pay doubling each day the employee works. The program should ask the user for the number of days the employee worked during the month, validate that it is between 1 and 31, and then display a table showing how much the salary was for each day worked, as well as the total pay earned for the month. The output should be displayed in dollars with two decimal points, not in pennies.arrow_forwardIn Java: Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outputs yes if every character is a digit 0-9. Ex: If the input is: 1995 the output is: yes Ex: If the input is: 42,000 or 1995! the output is: no Hint: Use a loop and the Character.isDigit() function.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education