In: Computer Science
Flowchart + Python. Ask the user for a value. Then, ask the user for the number of expressions of that value. Use While Loops to make a program. So then, it should be so that 5 expressions for the value 9 would be:
9 * 1 = 9
9 * 2 = 18
9 * 3 = 27
9 * 4 = 36
9 * 5 = 45
Flowcharts and Python Code. Not just Python code. I cannot read handwriting. I need to declare variables. I need to avoid global variables by passing down parameters and returning the results. I need separate functions for input, every processing, and the output.
According to the problem statement above,
I have coded the function using PYTHON
Below are the Snippets:
Code Snippet:
Output Snippet:
Flowchart:
Code in Text format:
value = input("Enter Value: ") # asking user to enter value
expression = input("Enter number of Expressions: ") # asking user to enter number of expressions
for i in range(1,expression + 1, 1): # loop from 1 to number of expressions
print value," * ", i, " = ", value * i # printing the output as like problem statement
I hope the above snippets, information, and the explanation will help you out!
Please comment if you have any queries/errors!
Thank you!