Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to create a program that: Reads a file called weather.txt that contains the amount of (r)ain and (s)now on a given day where

You are to create a program that:

  • Reads a file called weather.txt that contains the amount of (r)ain and (s)now on a given day where it rained or snowed. This data was collected for a year and only represents rain/snow days
  • From this file
    • Capture the number of days of rain
    • Capture the amount of rain on that day. It is provided in inches
    • Calculate the total the amount of rain for the year in feet and inches
    • Give the average amount of rain per day in inches
    • Capture the number of days of snow
    • Capture the amount of snow on that day. It is provided in inches
    • Calculate the total the amount of snow for the year in feet and inches
    • Give the average amount of snow per day in inches
    • Read all the data from the file.

Data.TXT In File

r 10

s 4

s 11

s 10

r 3

r 3

r 8

r 3

r 10

r 12

r 4

r 6

r 6

r 12

s 6

r 8

s 9

r 2

r 1

s 11

r 12

s 6

r 10

r 10

r 6

r 11

r 5

r 12

s 10

r 7

s 2

r 4

s 8

r 8

s 6

r 9

r 3

r 10

s 11

r 4

r 10

s 4

s 5

r 8

r 1

r 2

s 5

r 4

r 1

r 1

s 5

r 2

r 5

s 1

r 5

r 5

r 2

s 5

r 5

r 4

s3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

What is the fundamental question that sensitivity analysis answers?

Answered: 1 week ago

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago