Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

actmty 4.2.3: detect specific values. jump to level 1 if num_fluid_ounc…

Question

actmty 4.2.3: detect specific values. jump to level 1 if num_fluid_ounces is: - 2, output \quarter cup\. - 4, output \half cup\. otherwise, output \other amount\. click here for examples 1 num_fluid_ounces = int(input()) 2 3 4 your code goes here...

Explanation:

Step1: Define conditional for 2 ounces

if num_fluid_ounces == 2:
    print("Quarter cup")

Step2: Define conditional for 4 ounces

elif num_fluid_ounces == 4:
    print("Half cup")

Step3: Define other case

else:
    print("Other amount")

Answer:

num_fluid_ounces = int(input())
if num_fluid_ounces == 2:
    print("Quarter cup")
elif num_fluid_ounces == 4:
    print("Half cup")
else:
    print("Other amount")