Calculate the following in Python using variables and arithmetic operators:
num1 ← 10num2 ← 5num3 ← num1 + num2 * 2num4 ← (num1 + num2) * 2num5 ← num3 / 3 + num4num3, num4, and num5.Hint: Use
+,-,*,/, and parentheses to control order of operations.
Write Python code for this algorithm without using loops or if statements:
Algorithm:
item to 7num1 = 3, num2 = 7, num3 = 9item (just write it as a sequence of assignments and displays)"Item found" if a variable matches item"Item not found" if none matchHint: Since you haven’t learned
ifstatements, just write a sequence that shows the comparisons step by step with comments.
Write a Python program that:
a = 8, b = 4, c = 10result1 = a + b * cresult2 = (a + b) * cresult3 = a + (b / c)This will help you practice order of operations and arithmetic in Python.