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
Alborosie
3 years ago
12

To plan a pizza party, one may want to order enough pizza for everyone. Use the slicesInPizza, slicesPerPerson, and totalGuests

variables to compute the total number of pizzas needed to feed all the guests and store the result in totalPizzas. The total may have a decimal place.
1 var slicesInPizza = 8; // Code tested with values: 8 and 12
2 var slices PerPerson = 4; // Code tested with values: 4 and 5
3 var totalI Persons = 12; // Code tested with values: 12 and 10
4
5 var pizzasNeeded = 0;
Computers and Technology
1 answer:
zheka24 [161]3 years ago
6 0

Answer:

Explanation:

The following code was written in Javascript. It asks the user to enter the values for each of the variables and saves it to them. Then it uses those values to calculate the total number of pizzas needed to feed everyone at the party. Finally, it prints out the total to the screen as an alert. Both test cases were used and the outputs can be seen in the attached images below.

var slicesPerPizza = window.prompt("How many slices per pizza?");

var slicesPerPerson = window.prompt("How many slices per person?");

var totalPersons = window.prompt("How many total people will attend?");

var pizzasNeeded = Math.round((slicesPerPerson * totalPersons) / slicesPerPizza)

alert(`You need a total of ${pizzasNeeded} pizzas.`)

You might be interested in
Within a major students can choose to study a specific area within major. For example a journalism student may study military jo
crimeas [40]

Answer:

Specialization

Hope this helps!

6 0
3 years ago
In every programming language, when you access data stored in an array, you must use a ____ containing a value that accesses mem
Mariulka [41]
An array is an indexed collection of data elements. First you must declare an array, give its name and data. <span>Once your arrays are declared, you access the elements in an array with the array name, and the index number inside brackets [ ].
So, in every </span><span>programming language, when you access data stored in an array, you must use a command [] (brackets) containing a value that accesses memory occupied by the array.</span>
4 0
3 years ago
Look at the following Python code:
aliya0001 [1]

Ump will be assigned to word2

word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)

4 0
3 years ago
If you were at the front of a long line of people, stepped onto a chair and took a
WINSTONCH [101]
They are closer to the people and they work than a senior management
7 0
3 years ago
Which is true about TCP and UDP? Choose two answers.
vichka [17]

Answer:

TCP is a connection-oriented protocol

UDP does not acknowledge a receipt of data

Explanation:

TCP (Transmission Control Protocol) is a protocol to transfer data, this is one of the most important protocols on the entire internet, this method was implemented from the beginning of the network.

UDP (User Datagram Protocol) this is a protocol faster than TCP because this method doesn't establish a connection to sent data, in this case, always sent data, but TCP is more secure than UDP, and for that UDP is used to transfer music or videos, and TCP websites and database.

UDP doesn't need acknowledgment is done by UDP, is only concerned with speed.

7 0
4 years ago
Other questions:
  • _ are typically comprised of a mix of _ and _
    11·2 answers
  • Identify four basic data manipulations performed on a relational database using sql
    7·1 answer
  • Jose is upgrading the memory on his laptop. The laptop has two slots for RAM, but one of them is currently being occupied. He ha
    14·1 answer
  • The use of public wireless connections can increase a user's vulnerability to monitoring and compromise. ____________ software c
    14·1 answer
  • Create a method called fixArray(int[][] array, int row, int col, int value) that sets the [row][column] to the correct value. Th
    5·1 answer
  • if an open cut or wound is exposed to contamination washing it in hot water and hand soap is not sufficient to keep safe
    14·2 answers
  • Write a program that prompts the user to enter a number then counts the number of odd numbers and even numbers the user enter. T
    15·1 answer
  • What is the difference between a Yahoo! and Yippy!?\
    12·1 answer
  • Which of the following is a database concept that allows for storage and analysis for a dozen to billions of data points?
    7·1 answer
  • Amaya is curious how her computer actually boots up. Which of the
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!