answer.
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
xenn [34]
2 years ago
12

Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a str

ing inputStr for you, which is a decimal string meaning the side length L of the pizza in cm. The area of the pizza should be computed using the formula A = L*L. Then, assuming that each person needs to eat 100 cm2 of pizza, compute the number of people it can feed, rounded down to the nearest integer
Computers and Technology
1 answer:
Nina [5.8K]2 years ago
3 0

Answer:

Following are the program in the Python Programming Language.

#get input from the user length of the pizza

inputStr = input('Enter the length of pizza: ')

#convert input into float

L = float(inputStr)

#initialize the area of the pizza

A = L*L

#calculate the amount of peoples can eat pizza

men = int(A/100)

#print the number of peoples

print('\nPizza can be eaten by {} people'.format(men))

<u>Output</u>:

Enter the length of pizza: 20

Pizza can be eaten by 4 people

Explanation:

<u>Following are the description of the program</u>.

  • Firstly, set a variable that get length input from the user.
  • Set variable 'L' that convert the input from the user into the float data type.
  • Set variable 'A' that stores the area of the pizza.
  • Set variable 'men' that store the amount of peoples can eat pizza.
  • Finally, print the number of peoples can eat pizza.
You might be interested in
+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~
Karo-lina-s [1.5K]

+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.+10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~

Which statement describes what happens when a user configures No Automatic Filtering in Junk Mail Options?

No messages will ever be blocked from the user’s mailbox.

Messages can still be blocked at the server level.

Messages cannot be blocked at the network firewall.

Most obvious spam messages will still reach the client computer.

<em><u>please</u></em><em><u> </u></em><em><u>mark</u></em><em><u> </u></em><em><u>me</u></em><em><u> </u></em><em><u>as</u></em><em><u> </u></em><em><u>brainliest</u></em><em><u>. </u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

<em><u>follow</u></em><em><u> </u></em><em><u>me</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>my</u></em><em><u> </u></em><em><u>fr</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em><em><u>.</u></em>

6 0
2 years ago
Ted knows that macros can be helpful to him in his work with Excel spreadsheets,but he also knows they have their hazards,so he
laila [671]

Answer:

Hhhhhhhhjjjffhkvs4hjtth

Explanation:

H*jhfujttjhfhjfhhdtjdgndrjgr7kvykngimg6

3 0
2 years ago
Give a recursive algorithm to compute the sum of the cubes of the first n positive integers. The input to the algorithm is a pos
DaniilM [7]

Answer:

def sum_cubes(n):

   if n == 1:

       return 1

   else:

       return n * n * n + sum_cubes(n-1)

print(sum_cubes(3))

Explanation:

Create a function called sum_cubes that takes one parameter, n

If n is equal to 1, return 1. Otherwise, calculate the cube of n, and add it to the sum_cubes function with parameter n-1

If we want to calculate the cubes of the first 3 numbers:

sum_cubes(3) = 3*3*3 + sum_cubes(2)

sum_cubes(2) = 2*2*2 + sum_cubes(1)

sum_cubes(1) = 1

If you substitute the values from the bottom, you get 27+8+1 = 36

7 0
2 years ago
Write an expression that will cause the following code to print "I am a teenager" if the value of userAge is less than 20. Zyboo
VikaD [51]

Answer:

Replace

if userAge > 20

with

userAge > 19

Explanation:

if userAge > 20  checks if age is 21, 22, 23, 24........

The else condition which prints "I am a teenager" checks if age is 20, 19, 18....

Notice that 20 is inclusive of the else condition; this shouldn't be because for userAge to be less than 20, 20 isn't inclusive

To solve this,

Replace if userAge > 20 with userAge > 19

So that, the else

The else condition which prints "I am a teenager" checks if age is 19, 18, 17, 16....

6 0
2 years ago
Which of the following is an advantage of inserting a page number field in your document rather than inserting each page number
Artyom0805 [142]

The advantage of inserting the page number field is that the page number field could show the current page number.

The following information should be relevant with respect to the page number:

  • The page number field & the actual page number should be formatted.
  • The page number field & the actual page number both could be inserted into the header or footer.
  • The page number field & the actual page number could be easily inserted into the document.

Therefore we can conclude that the advantage of inserting the page number field is that the page number field could show the current page number.

Learn more about the page number here: brainly.com/question/3063419

8 0
2 years ago
Other questions:
  • In an ethernet network, the signal that is sent to indicate a signal collision is called a ________ signal.
    7·1 answer
  • Marissa works at a company that makes perfume. She noticed many samples of the perfume were not passing inspection. She conducte
    6·2 answers
  • Justin signed a rental agreement for his new condo. How long is his lease? a p e x
    15·1 answer
  • Write a function called st_dev. St_dev should have one #parameter, a filename. The file will contain one integer on #each line.
    7·1 answer
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • Write a program that takes in an integer in the range 10 to 100 as input. Your program should countdown from that number to 0, p
    12·1 answer
  • Interactive media professionals are unique among other Information Technology professionals because they have very good job pros
    6·1 answer
  • Why do agriculture and natural resource systems vary from state to state?
    8·1 answer
  • Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
    15·1 answer
  • When adopting and implementing a Software as a Service (SaaS) platform such as Salesforce for your business, which responsibilit
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!