subject

Objectives:
1. To reinforce the use of loops.
2. To learn how to read information from files.

Movies about dragons and dragon training were very popular this summer. Your friend has not stopped talking about how awesome dragons are and how cool it would be to train them. To amuse your friend, you have decided to create a series of programs about dragons.
Problem:
In previous programs, we helped your dragon learn how to fly and train to improve their flight distance. It's time for your dragon's Celebration of the First Flight, similar to a dragon sweet 16. Every day for a month, your dragon is responsible for scheduling demonstration flights with the other members of Dragon Island. Your dragon wants to be presented in the best possible light, so it is up to you to determine the best month for the Celebration.
In this program, you will examine a file of weather data. Ask the user for the name of this file. Then, ask the user for the temperature range that their dragon flies best in. Calculate the percentage of days in each month that fall into that range. Dragon Island does not have a complete set of weather data, so the file of weather data may not contain information for every day in every month. Instead, calculate the percentage by dividing the number of days in range by the number of days that there is data for.
The month with the highest percentage is the month that the dragon should pick for their Celebration of the First Flight.
Arrays are not expected to be a part of this program, except for the name of the input file. Do not attempt to store all the values in the file in your program.

Input Specification:
1. The lower bound temperature will be an integer between 0 and 80
2. The upper bound temperature will be an integer higher than the lower bound and less than 120
3. The file name will be a string less than 30 characters in length

Input File Specification:
There will be 12 months of weather data available. Since months may not have complete information, each month will begin with a header number (n) to indicate how many temperatures are available for that month. The month will then have n real numbers representing the temperature for each day.

Output Specification:
Output to the screen. Show the user the percentage of days in range for each month. Then, print the best month for the Celebration of the First Flight.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
You know the right answer?
Objectives:
1. To reinforce the use of loops.
2. To learn how to read information from...
Questions
question
Social Studies, 27.09.2019 13:20
Questions on the website: 13722361