Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Assume that the variable a= 1, b= 6, c= 5, d= 9 state whether each of the fol

ID: 3628960 • Letter: 2

Question

2. Assume that the variable a= 1, b= 6, c= 5, d= 9 state whether each of the following Boolean expressions are true or false:
A) a==6
B) 8<=(a+b)
C) c!=5
D) (a+4)>5
E) d/2<4

3. Write a program that asks for the number of calories and protein grams in a food. The program should display the percentage of calories that come from protein. If the calories from protein are greater than 40% of the total colories of the food. It should display a message indicating that the food is high in protein, otherwise don't display anything. One gram of protein has four calories. Make sure that the number of calories and proteins grams are not less than 0. Also check that the numbers of calories from proteins are not greater than the total number of calories. If any of these errors occur than display an appropriate error message.

Explanation / Answer

2)

A)false

B)false

C)false

d)false

e) false

//Only one question per post dude...