1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lbvjy [14]
3 years ago
9

python program Calculate and print out all the options of meals where the budget is used entirely(where possible) and each perso

n has an equal number of items to eat. They may eat different things, but everyone gets the same number of food items, e.g. 2 tacos or 1 empanada and 1 taco or 2 empanadas.
Computers and Technology
1 answer:
hammer [34]3 years ago
8 0

Answer:

Python code is explained below

Explanation:

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")

You might be interested in
Which of the following describe the characteristics of a good logo? Choose all that apply. It is a complex design It is memorabl
nasty-shy [4]

Answer:

It is memorable.

It utilizes the elements of design.

Explanation:

IMO these 2 will determine a good logo. Since everyone should remember it if they come across it again in the future

6 0
2 years ago
Which of the following is a quick way to restore the arrow pointer after you have used it for drawing?
Oxana [17]
A quick way to restore the arrow pointer after you have used it for drawing is to press the esc key.  The esc key is <span>used for any of the different </span>functions<span>, as to interrupt or cancel the current process or running program, or to close a pop-up window.</span>
7 0
3 years ago
Problems and Exercises 16 through 43 are based on the entire ("big" version) Pine Valley Furniture Company database. Note: Depen
lesya [120]

Answer:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

Explanation:

SQL queries

The command used to display the customer ID and total number of orders placed is given below

Query:

SELECT CustomerID, COUNT (orderID) AS TotalOrders

FROM Order_Table

GROUP BY CustomerID

SELECT - To query the database and get back the specified fields SQL uses the select statement

CustomerID is a coloumn name

The function COUNT(OrderID) returns the number of orders

Totalorderds is a label

FROM - To query the database and get back the preferred information by specifying the table name

Order_Table is a table name

GROUP BY - The clause is used to group the result of a SELECT statement done on a table where the tuple values are similar for more than one column

The table below displays the CustomerID and total number of orders placed

CustomerID                                              Totalorders

4                                                                    28

1                                                                      6

12                                                                    5

16                                                                    5

6                                                                     3

9                                                                     3

15                                                                    3

3                                                                     1

13                                                                    1

14                                                                    1

The table below shows the total number of orders situated for each sales person

SalesPerson_ID                                         TotalOrders

3                                                                    16

2                                                                     3

4                                                                     3

5                                                                     3

3 0
3 years ago
When you connect to an Access database, which entities are shown in the Navigator window?
Leni [432]

1DFASDFAASDASDFASDFADSFASFD

4 0
3 years ago
Read 2 more answers
How to change a documents theme colors in word?
VladimirAG [237]

Answer:

Change the theme colors in Word

1. Select Design > Colors.

2. Point to a color to preview how it will look in your document.

3. Select a color scheme.

Explanation:

7 0
3 years ago
Other questions:
  • When using a wireless mouse, what is the most common port used for the transmitter? 
    7·1 answer
  • Remote wiping is a device security control that allows an organization to remotely erase data or email in the event of loss or t
    10·2 answers
  • You are an IT technician at your company. The company has two small offices in different cities. The company's head office conta
    5·1 answer
  • VOTE!
    11·1 answer
  • Create a script that will determine how many of each currency type are needed to make change for a given amount of dollar and ce
    8·1 answer
  • You are asked to write a program that prompts the user for the size of two integer arrays, user input for the size must not exce
    13·1 answer
  • Identify and explain 3 methods of automatically formatting documents​
    8·1 answer
  • . In this project, how many times will the [Drive] block be repeated?
    15·1 answer
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
  • Choose the answer that best completes the visual analogy.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!