Changes

Jump to: navigation, search

OPS445 Online Assignment 2

51 bytes removed, 17:22, 22 March 2022
m
Required Functions
** Your list should <u>NOT</u> contain newline characters.
* <code>percent_to_graph()</code> should take two arguments: percent and the total chars. It should return a 'bar graph' as a string.
** Your function should check that a percent argument is a valid number between 0 and 100. It should fail if it isn't. You can <code>raise ValueError</code> in this case.
** <b>total chars</b> refers to the total number of characters that the bar graph will be composed of. You can use equal signs <code>=</code> or any other character that makes sense, but the empty space <b>must be composed of spaces</b>, at least until you have passed the first milestone.
** The string returned by this function should only be composed of these two characters. For example, calling <code>percent_to_graph(50, 10)</code> should return:
572
edits

Navigation menu