Question: [H1-4] (paren. py) Consider the following arithmetic expression in Python: 543/21 Write a program which prints out this unparenthesized expression, then prints out as many
[H1-4] (paren. py) Consider the following arithmetic expression in Python: 543/21 Write a program which prints out this unparenthesized expression, then prints out as many differently parenthesized versions of it as you can, such that each output value is dififerent than the others. For example, peint (5 - 43/21) outputs 1. You can parenthesize and print this expression as print ((54)3/21), so its output value is 1.5 which is different that the original. Continue in this way, writing as many differently parenthesized versions as possible, such that each prints out a different value than all the rest. You can use more than one pair of parentheses if you wish, but there should not be any duplicate values in your output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
