Question 1) Create a Python program called "test3_firstname_latename" with 2 function calls in the main body as shown below: add_star() longest_run() (These functions are defined later) 1- In algebraic expressions, the symbol for multiplication is often left out, as in 3x+4y or 3(x+5). Computers prefer those expressions to include the multiplication symbol, like 3*x+4*y or 3*(x+5). Create a function called add_star() that asks the user for an expression. Your function must print the original expression and also the modified expression. You may assume the input expression is consisted of the following characters: Variable names are 0ne character long, i.e. xy is 2 variables x and y. Valid operators are +,-,* and /. ( and ) characters Numbers are of any length. Two examples are shown below:
Question 1) Create a Python program called "test3_firstname_latename" with 2 function calls in the main body as shown below:
add_star()
longest_run() (These functions are defined later)
1- In algebraic expressions, the symbol for multiplication is often left out, as in 3x+4y or 3(x+5). Computers prefer those expressions to include the multiplication symbol, like 3*x+4*y or 3*(x+5). Create a function called add_star() that asks the user for an expression. Your function must print the original expression and also the modified expression.
You may assume the input expression is consisted of the following characters:
Variable names are 0ne character long, i.e. xy is 2 variables x and y.
Valid operators are +,-,* and /.
( and ) characters
Numbers are of any length.
Two examples are shown below:
Please try to answer within 30 - 45 minutes.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images