Question: Can someone explain why this code works perfectly on repl.it Python 3 below BUT, in visual studios with Python 3.6 it will continue to ask
Can someone explain why this code works perfectly on repl.it Python 3 below BUT, in visual studios with Python 3.6 it will continue to ask questions pertaining to the other user answer to the conditional statement despite them picking "lose weight"? In other words, it starts asking user input for gaining muscle even though the user chose lose weight. See all images please. First the visual studio version with the resulting complication and then the repl.it version with no issues. Plus, I copied and pasted the code at the bottom.


overallGoal= str(input("Do you desire to lose weight or gain muscle? "))
if overallGoal == "lose weight" or overallGoal == "LOSE WEIGHT": currentWeight = int(input("Please enter current weight in pounds. ")) idealWeight= int(input("Please enter the weight you wish to obtain ultimately. "))
elif overallGoal == "gain muscle" or "GAIN MUSCLE": maxBench = int(input("Please enter your current 1 rep max bench press in pounds. ")) idealmaxBench= int(input("Please enter your ideal 1 rep max bench press in pounds. ")) maxbackSquat = int(input("Please enter your current 1 rep max back squat in pounds. ")) idealmaxSquat= int(input("Please enter your ideal 1 rep max back squat in pounds. ")) maxmilitaryPress= int(input("Please enter your current 1 rep max military press in pounds. ")) idealmilitaryPress = int(input("Please enter your ideal 1 rep max military press in pounds. ")) maxdeadLift= int(input("Please enter your current 1 rep max deadlift in pounds. ")) idealdeadLift= int(input("Please enter your ideal 1 rep max deadlift in pounds. ")) goalSetting= str(input("Do you wish to set goals biweekly or monthly? ")) if goalSetting == "biweekly" or goalSetting== "BIWEEKLY" and goalSetting =="": print("Your code here")
C:\Program Files\Python36\python.exe Do you desire to lose weight or gain muscle? lose weight Please enter current weight in pounds. 150 Please enter the weight you wish to obtain ultimately. 130 Please enter your current 1 rep max bench press in pounds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
