In Python, Prompt the user to enter their current budget and the number of people who need to share a meal. You are entering food from a restaurant that has two menu options. Tacos $4, Epandas $3.
Calculate and print out all the options of meals where the budget is used entirely (where possible) and each person has an equal number of items to eat. They may eat different things but everyone gets the same number of food items
We calculated maximum number of tacos and maximum number of
espandas individually could be ordered in the provided budget which
was round down cause no one can order meal in decimals.
In first loop, number of tacos was increasing until it reach the
maximum number that can be order in that budget.
In second loop, number of espandas was increasing till it reach the
maximum number that can be order, after that total costing was
calculated with every possible way the item could be ordered and if
the cost of that combination of number of tacos and espandas was
equal to the provided budget then number of items ordered can be
equally divided among the number of people was checked. When all
the conditions were satisfied for the particular combination of
meal then the combination was printed.
CODE:
import math
budget = eval(input("Enter budget:"))
numberOfPeople = eval(input("Enter number of people:"))
nT = math.floor(budget/4) #maximum number of tacos in the
budget
nE = math.floor(budget/3) #maximum number of espandas in the
budget
for T in range (0,nT):
for E in range (0,nE):
foodPrice = 4*T + 3*E #money cost for that meal
if foodPrice == budget:
TotalFood = T + E #total number of meal
if TotalFood % numberOfPeople == 0:
print(T,"number of Tacos",end = ' and ')
print(E,"number of Espandas")


In Python, Prompt the user to enter their current budget and the number of people who...
In Python please. At Jenny’s birthday party she orders a 32-piece pizza. Have the user enter the number of people at the party that will be eating pizza and output the number of slices each one gets. As you know the pizza might not divide evenly. There are two ways to handle this. The first is to ignore the extra pieces and give everyone the same amount. The second way is to cut up the extra pieces so that everyone...
I am struggling with a program in C++. it involves using a struct and a class to create meal arrays from a user. I've written my main okay. but the functions in the class are giving me issues with constructors deconstructors. Instructions A restaurant in the Milky way galaxy called “Green Alien” has several meals available on their electronic menu. For each food item in each meal, the menu lists the calories per gram and the number of grams per...
Are the following random variables binomial? If it is, state the possible values of the random variable. If not, state why. (Hint: Check the five characteristics of a binomial experiment that we discussed in class.) (a) Bob is teaching his daughter Tina to drive. They have one driving lesson a day for one week. X = the number of days that Tina successfully goes without hitting another car. (b) Joey and Chandler are playing a board game that involves rolling...
C++ (1) Prompt the user to enter a string of their choosing (Hint: you will need to call the getline() function to read a string consisting of white spaces.) Store the text in a string. Output the string. (1 pt) Ex: Enter a sample text: We'll continue our quest in space. There will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. Nothing ends here; our hopes and our journeys continue!...
Read Case Study 1: Gormand and Food—A Fable in Chapter 1 of your textbook. Identify the commonalities between this case study and the delivery of healthcare in the United States. What in this case study is not likely to occur to healthcare in the United States? Why? Gourmand and Food—A Fable225 The people of Gourmand loved good food. They ate in good restaurants, donated money for cooking research, and instructed their government to safeguard all matters having to do with...
VERY URGENT*** THANK YOU IN ADVANCE: THIS IS THE CODE I HAVE GOTTEN SO FAR: PYTHON This is a code that is supposed to help someone study/ practice for jeopardy. The two functions described below are required for this assignment. You may add other functions that you think are appropriate: menu() This function, which displays all the user options to the screen, prompt the user for their choice and returns their choice. This function will verify user input and ALWAYS...
Help needed with Python 3: Dictionaries and Sets.
The problem is one that asks the user to create a completed
program that prompts the user for the name of a data file, and
reads the contents of that data file, then creates variables in a
form suitable for computing the answer to some questions.
The format should be in the same manner as the attached .py
file. All subsequent assignment details (.py and .csv files) can be
found at this...
write by python code and screenshoot the python code for me. thanks The Problem: You are to design a Calorie Intake Assistant tailored to the user’s personal characteristics. The assistant will initially ask the user for his/her gender, name, age in years, height in cm and weight in kg. Based on these, the assistant will calculate the recommended daily calorie intake (RDCI) using the Mifflin – St Jeor formula[1], which is also shown to the user: Mifflin – St Jeor...
Write by python and screenshoot the python code for me . many thanks The Problem: You are to design a Calorie Intake Assistant tailored to the user’s personal characteristics. The assistant will initially ask the user for his/her gender, name, age in years, height in cm and weight in kg. Based on these, the assistant will calculate the recommended daily calorie intake (RDCI) using the Mifflin – St Jeor formula[1], which is also shown to the user: For each day...