In-Class Lab Assignment 3

docx

School

University of Texas, Rio Grande Valley *

*We aren’t endorsed by this school

Course

1380

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

1

Uploaded by keylym07

Report
CSCI 1380 Yessenia Rodriguez Name: _______________________ In-Class Lab #3 Write a Python program that produces a bar graph in an output file, titled Sales.txt, that compares each store’s sales. The program should read the day’s sales for x number of stores from a file. The number of stores depends on the number of values in the input file. Create each bar in the bar graph by displaying a row of asterisks. Each asterisk should represent $100 of sales. Here is an example of the contents of the input file: 1000 1200 1800 800 1900 Here is an example of the program’s output in Sales.txt : SALES BAR CHART (Each * = $100) Store 1 = ********** Store 2 = ************ Store 3 = ****************** Store 4 = ******** Store 5 = ******************* Hint: To create a bar, use a loop to print the necessary “*”.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help