Changes

Jump to: navigation, search

OPS435 Assignment 1 for Section C

622 bytes added, 14:57, 1 February 2021
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 the percent argument is a valid number between 0 and 100. It should fail if it isn't. You can <code>call_hostname()raise ValueError</code> and 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>call_uptime()=</code> should take no argumentsor any other character that makes sense, but the empty space <b>must be composed of spaces<b>, and should return strings from at least until you have passed the shellfirst milestone.* * The string returned by this function should only be composed of these two characters. For example, calling <code>percent_to_graph(percent50, 10)</code> will take an integer should return: 'percent===== ' and return * <code>create_dir_dict</code> should take a bar graph that represents this percentage. The bar graph should begin with '['list as the argument, and end with ']'. Then contents inside should be 20 characters longreturn a dictionary.* * The list can be the list returned by <code>print_percent_linecall_du_sub(name, percent)</code> is provided . ** The dictionary that you return should have the full directory name as a convenience for you. It will print a properly formatted line<i>key</i>, such and the number of bytes in the directory as the one in <i>value</i>. This value should be an integer. For example, using the example aboveof <b>/usr/local/lib</b>, the function would return: {'/usr/local/lib/heroku': 164028, '/usr/local/lib/python2.7': 11072, ...}
== Additional Functions ==

Navigation menu