Computers and Technology
Computers and Technology, 08.11.2019 00:31, arugg2k24

Write a function maxtemp which takes a filename as string argument and returns the maximum temperature as float type for the week. input file will contain temperature readings for each day of the week. your function should read each line from the given filename, parse and process the data, and return the required information. your function should return the highest temperature for the whole week. empty lines do not count as entries, and should be ignored. if the input file cannot be opened, return -1. remember temperature readings can be decimal and negative numbers. each line of the file contains two elements, separated by commas day, temperature monday,52 note: the split() function is provided, and functions as it does in the homework assignments, to make parsing the output easier. recall that split takes a string s and splits it at the input delimiter sep, to fill the array words[] up to a capacity of max_words. the return value of split is the number of actual words the string is split into.

answer
Answers: 1

Similar questions

Do you know the correct answer?
Write a function maxtemp which takes a filename as string argument and returns the maximum temperatu...

Questions in other subjects:

Konu
Spanish, 17.01.2020 18:31
Konu
Spanish, 17.01.2020 18:31