How to create bar graphs without matplotlib

Asked 1 years ago, Updated 1 years ago, 244 views

I don't understand the problem of creating a function print_row_dot_graph that receives a list of integers as input and displays a horizontal bar graph as a print function as shown below.

Example) print_row_dot_graph([2,1,2,1])
**
*
**
*
Yes, I would appreciate it if you could let me know.

python windows

2023-01-19 16:23

1 Answers

defprint_row_dot_graph(values):
    for vin values:
        print('*'*v) 

if__name__=='__main__':
    print_row_dot_graph ([2,1,2,1])


2023-01-19 22:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.