Average Number of Words
If you have downloaded the source code from the Computer Science Portal you will find a file named text . txt in the Chapter 08 folder. The text that is in the file is stored as one sentence per line. Write a
(You can access the Computer Science Portal at www.pearsonhighered.com/gaddis.)
Learn your wayIncludes step-by-step video
Chapter 8 Solutions
Starting Out with Python (4th Edition)
Additional Engineering Textbook Solutions
Introduction To Programming Using Visual Basic (11th Edition)
Computer Science: An Overview (12th Edition)
Starting Out with C++ from Control Structures to Objects (8th Edition)
Concepts Of Programming Languages
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
- Overview: Create a coin flip game that allows the user to guess whether the coin will be heads or tails. Save the data associated with the flip. Repeat for a total of 10 guesses/flips. Display result summary and details at end. Technical Requirements: Participant will guess whether a coin flip will result in Heads or Tails Computer will "flip" a coin to determine the side it lands using random generator import random at top of program result = random.randint(x,x) The program will display the results: Guess, Flip, Outcome (Match or No Match) The program will track the results and, when the game is over, display: Summary Detailed result of each turn Use parallel arrays to collect details from each turn that can be displayed as a table when the game is over Use running totals of each result detail to display at endarrow_forwardTranscribed Image Text Create a program that allows the user to do some basic functions. First, ask the user if they would like to find out sqrt, log or factorial of a number, then return the results. Here is the sample output: Welcome to the simple math helper. What would you like to calculate? 1. Sqrt 2. Log 3. Factorial > 1 Enter the number to sqrt: >9arrow_forwardPlease Debug this 1arrow_forward
- Please provide answer in C#: Slot Machine Simulation A slot machine is a gambling device into which the user inserts money and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create an application that simulates a slot machine. Figure 8-23 (on page 539 of your book) shows an example of how the form should look. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols. You will find a set of fruit symbols attached to this dropbox for your use - from the Student Sample Programs provided by the book author.) If none of the randomly displayed images match, the program should inform the user that he or she has won…arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program named TestScoreList that accepts eight int values representing student test scores. Display each of the values along with a message that indicates how far it is from the average.arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program named CheckZips that is used by a package delivery service to check delivery areas. The program contains an array that holds the 10 zip codes of areas to which the company makes deliveries. Prompt a user to enter a zip code, and display a message indicating whether the zip code is in the companys delivery area.arrow_forward
- Open the Calories Solution.sln file contained in the VB2017\Chap08\Calories Solution folder. Open the Code Editor window and locate the btnDisplay_Click procedure. The procedure declares and initializes a one-dimensional array named intCalories. The array stores the numbers of daily calories consumed. The procedure should calculate and display the average number of calories consumed; use the Math.Round method to round the average to an integer. (You learned about the Math.Round method in Chapter 6.) The procedure should also display the number of days in which the daily calories were greater than the average, the number of days in which the daily calories were the same as the average, and the number of days in which the daily calories were less than the average. Code the procedure. Save the solution and then start and test the application.arrow_forwardIn this exercise, you modify the Grade Calculator application from this chapter’s Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate. Open the Grade Solution.sln file contained in the Grade Solution-Intermediate folder. Open the CourseGrade.vb file. The DetermineGrade method should accept an integer that represents the total number of points that can be earned in the course. (Currently, the total number of points is 200: 100 points per test.) For an A grade, the student must earn at least 90% of the total points. For a B, C, and D grade, the student must earn at least 80%, 70%, and 60%, respectively. If the student earns less than 60% of the total points, the grade is F. Make the appropriate modifications to the DetermineGrade method and then save the solution. Unlock the controls on the form. Add a label control and a text box to the form. Change the label control’s Text property to “&Maximum points:” (without the quotation marks). Change the text box’s name to txtMax. Lock the controls and then reset the tab order. Open the form’s Code Editor window. The txtMax control should accept only numbers and the Backspace key. Code the appropriate procedure. The grade should be cleared when the user makes a change to the contents of the txtMax control. Code the appropriate procedure. Modify the frmMain_Load procedure so that each list box displays numbers from 0 through 200. Locate the btnDisplay_Click procedure. If the txtMax control does not contain a value, display an appropriate message. The maximum number allowed in the txtMax control should be 400; if the control contains a number that is more than 400, display an appropriate message. The statement that calculates the grade should pass the maximum number of points to the studentGrade object’s DetermineGrade method. Make the necessary modifications to the procedure. Save the solution and then start and test the application.arrow_forwardRead Algorithm And then solve it's partsarrow_forward
- Lap Timer Tool Write a Python (GUI program) that asks the user to enter the number of times that they have run around a racetrack, and then uses a loop to prompt them to enter the lap time for each of their laps. When the loop finishes, the program should display the time of their fastest lap, the time of their slowest lap, and their average lap time.arrow_forwardProgramming language C#arrow_forwardComputer Science C# Programming Object Orientation Please use Arrays or ArrayLists where appropriate Implement a menu driven program that has some operations for a food truck. A food truck has multiple food items as well as a menu which contains a selection of the food items which will be sold for that day. A maximum of 10 food items can appear on the menu for any day. For each food item keep a code, description, category, price and quantity in stock (code, description and category are not usually changed). Create a comma delimited text file called "items.txt" for 15 or more food items, indicating the item's description, category, price and quantity in stock. Read all the food items from the text file “Items.txt” Display all the food items available for this food truck. Continuously prompt the user for a food item’s code to be placed on the menu until the menu is full or the user enters -1. Note that only food items which have a positive quantity in stock may be added to…arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT