Programming For Business 3
Programming For Business 3
(24K-7300)
QUESTION 1
def main():
try:
# Input
# Input validation
return
calories_from_fat = fat_grams * 9
print("Error: Calories from fat cannot exceed total calories. Check your inputs.")
return
# Calculate percentage
# Output
except ValueError:
print("Error: Please enter valid numerical inputs.")
main()
QUESTION 2
def main():
try:
# Input
# Validation
if fsc_marks < 0 or fsc_marks > 100 or nts_marks < 0 or nts_marks > 100:
return
# Allocation logic
else:
except ValueError:
main()
QUESTION 3
def main():
# Input
# Determine car
if trucks == "no":
if trucks == "no":
else:
main()