Question: Please redesign this python program to be more complex. Be sure to create a new flowchart and table. def main(): ''' Program accepts a number
Please redesign this python program to be more complex. Be sure to create a new flowchart and table.
def main(): ''' Program accepts a number between 1 and 100 from user determines how small or big the number in comparison to 50 prints negative if its less than 0 prints greater than 100 if its greater than 100 :return: None ''' num = int(input('Enter an integer between 1 and 100: ')) if num < 0: print(num, 'is a negative number.') elif num > 100: print(num, 'is greater than 100') elif num < 50: print(num, 'is', 50 - num, 'less than 50') elif num > 50: print(num, 'is', num-50, 'greater than 50') else: print(num, 'is exactly equal to 50') main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
