
Donald W. answered 05/25/22
Experienced and Patient Tutor for Math and Computer Science
Here you go:
Feel free to reach out if you have questions about any part of the code.
Michael L.
asked 05/25/22Instructions:
Write a program that extracts information from a text file containing information about images on a website.
Your program should read from a file called "Images.txt" which will consist of an unknown number of lines. Each line consists of an image URL (web address), an MD5 hash identifying the image, and a file size in bytes. Here is what a line might look like:
Note that the URL consists of http://smugmug.com/thumbs/
followed by a filename (Lacus.jpeg
) including extension, then a question mark and the width (170
) and height (330
) of the image. Do not count on the extension or the width & height being a specific length.
Your program should print out a well organized table that for each image shows: the filename, image type (the file extension), the width, the height and the size in kB (1024 bytes in a kB) rounded to one decimal place. It should then display the total size in kB of the images.
Images.txt
stored in the folder with your code, then try to open it, read in the first string (http://smugmug.com/thumbs/Lacus.jpeg?170x330
), and just print it out. Until you get that working, you shouldn't be worried about anything else.
to_string()
I need help, can somebody write out this program that reads an image.txt file like the assignment says? It really helps for me to see completed code and learn how it works from there, I had submitted this assignment a few weeks ago and had trouble with it. I need working code of this to study for final exams, thank you!
Donald W. answered 05/25/22
Experienced and Patient Tutor for Math and Computer Science
Here you go:
Feel free to reach out if you have questions about any part of the code.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.