Question: Challenge 2 : Can we program it ? code. Here are the procedures from the previous challenge. Meals are $ 1 2 . 5 0

Challenge 2: Can we program it? code.
Here are the procedures from the previous challenge.
Meals are $12.50 unless you are a student, and then it is $8.95
For groups of 8 people or more, we no longer look at how many students are a part of the group. We just charge everyone $10.25.
We want at least 50 forks available to guests. If the number of forks falls below 50, we will add 100 forks to the holder.
Question 1
2 pts
Knightro wants you to focus on the total cost people will pay when they come in. He already stores the number of non-students in a variable called people and students called students.
Write a single line of code that will store the total price the group will pay and store the result in the variable, total.
HINT: Make sure you leave the trailing zero in the price of the meal in your answer.
Question 2
2 pts
Since Knightro is storing the number of non-students and students in variables: people and students. Write an if statement that will determine if the group is large enough for a group discount.
Question 3
2 pts
Knightro assumes that the variable pizzas will be 1 or greater. He wants to write a line of code that will determine the total time it will take cook. Store the result as total_time.
Question 4
4 pts
Knightro has written a variable called forks. It stores the number of forks in the holder. Write two lines to determine if we need to add forks, then add the forks to the holder.
Line 1:
Line2:
 Challenge 2: Can we program it? code. Here are the procedures

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!