I tried def drawBarGraph():
but its giving me an error
After defining the list, how do you get the asterik to print for each element?
You'll use string multiplication based on each value. So like, "v" * value, if value = 5, would print vvvvv, five vs.
Think of it as a normal variable because defined function takes whatever you give it in the call statement. So just do drawBarGraph(yourList):
You'll want to put the name of a list you define in your main function in the parentheses, like: drawBarGraph(listName):
Then go and define listName in your main, before you call drawBarGraph.