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
gregori [183]
3 years ago
5

(1) Prompt the user for the number of cups of lemon juice, water, and agave nectar needed to make lemonade. Prompt the user to s

pecify the number of servings the recipe yields. Output the ingredients and serving size. (Submit for 2 points).
Engineering
1 answer:
Lady bird [3.3K]3 years ago
6 0

Answer:

The program to this question as follows:

Program:

Lemon= float(input('Enter lemon juice value in cups: ')) #defining float variable and input value by user

Water= float(input('Enter water value in cups: ')) #defining float variable and input value by user

Agave= float(input('Enter agave nectar value in cups: ')) #defining float variable and input value by user

Serve= float(input('enter serving value: '))  #defining float variable and input value by user

print ('Lemonade ingredients - yields',Serve,'servings',) #print value

print (Lemon,'cups in lemon juice',) #print value

print (Water,'cups in water',) #print value

print (Agave,'cups in agave nectar',) #print value

Output:

Enter lemon juice value in cups: 2

Enter water value in cups: 3

Enter agave nectar value in cups: 2

enter serving value: 2

Lemonade ingredients - yields 2.0 servings

2.0 cups in lemon juice

3.0 cups in water

2.0 cups in agave nectar

Explanation:

In the above python code, four float variable "Lemon, Water, Agave, and Serve" is defined, which is the input function is used.  

  • The input function message is written that passes in function parameter, that accepts value in the above variables.  
  • In the next step, the print function is used, which prints the above user input values.
You might be interested in
Suppose that a wireless link layer using a CSMA-like protocol backs off 1ms on average. A packet’s link and physical layer heade
Liula [17]
Tell me why i got this question got it right and now won’t remember but i’ll get back at you when i remember
5 0
3 years ago
The following C program asks the user for two input null-terminated strings, each stored in uninitialized 100-byte buffer, and c
marissa [1.9K]

Answer:

Code is given below:

Explanation:

.data  

str1: .space 20  

str2: .space 20  

msg1:.asciiz "Please enter string (max 20 characters): "  

msg2: .asciiz "\n Please enter string (max 20 chars): "  

msg3:.asciiz "\nSAME"  

msg4:.asciiz "\nNOT SAME"  

.text

.globl main

main:  

   li $v0,4        #loads msg1  

   la $a0,msg1  

   syscall

   li $v0,8

   la $a0,str1

   addi $a1,$zero,20

   syscall          #got string to manipulate

   li $v0,4        #loads msg2

   la $a0,msg2

   syscall

   li $v0,8

   la $a0,str2

   addi $a1,$zero,20

   syscall         #got string  

       la $a0,str1             #pass address of str1  

   la $a1,str2         #pass address of str2  

   jal methodComp      #call methodComp  

   beq $v0,$zero,ok    #check result  

   li $v0,4

   la $a0,msg4

   syscall

   j exit

ok:  

   li $v0,4  

   la $a0,msg3  

   syscall  

exit:  

   li $v0,10  

   syscall  

methodComp:  

   add $t0,$zero,$zero  

   add $t1,$zero,$a0  

   add $t2,$zero,$a1  

loop:  

   lb $t3($t1)         #load a byte from each string  

   lb $t4($t2)  

   beqz $t3,checkt2    #str1 end  

   beqz $t4,missmatch  

   slt $t5,$t3,$t4     #compare two bytes  

   bnez $t5,missmatch  

   addi $t1,$t1,1      #t1 points to the next byte of str1  

   addi $t2,$t2,1  

   j loop  

missmatch:    

   addi $v0,$zero,1  

   j endfunction  

checkt2:  

   bnez $t4,missmatch  

   add $v0,$zero,$zero  

endfunction:  

   jr $ra

3 0
3 years ago
Hỗ trợ mình với được không các bạn
Leya [2.2K]

Answer:

Explanation:

Be bop

6 0
3 years ago
What does snow fall from?
Klio2033 [76]

Answer:

Clouds

Explanation:

It is created by trapped dust and water.

4 0
3 years ago
An equal-tangent sag vertical curve (with a negative initial and a positive final grade) is designed for 55 mi/h. The PVI is at
Varvara68 [4.7K]

Answer:

The lowest point of the curve is at 239+42.5 ft where elevation is 124.16 ft.

Explanation:

Length of curve is given as

L=2(PVT-PVI)\\L=2(242+30-240+00)\\L=2(230)\\L=460 ft

G_2 is given as

G_2=\frac{E_{PVT}-E_{PVI}}{0.5L}\\G_2=\frac{127.5-122}{0.5*460}\\G_2=0.025=2.5 \%

The K value is given from the table 3.3 for 55 mi/hr is 115. So the value of A is given as

A=\frac{L}{K}\\A=\frac{460}{115}\\A=4

A is given as

-G_1=A-G_2\\-G_1=4.0-2.5\\-G_1=1.5\\G_1=-1.5\%

With initial grade, the elevation of PVC is

E_{PVC}=E_{PVI}+G_1(L/2)\\E_{PVC}=122+1.5%(460/2)\\E_{PVC}=125.45 ft\\

The station is given as

St_{PVC}=St_{PVI}-(L/2)\\St_{PVC}=24000-(230)\\St_{PVC}=237+70\\

Low point is given as

x=K \times |G_1|\\x=115 \times 1.5\\x=172.5 ft

The station of low point is given as

St_{low}=St_{PVC}-(x)\\St_{low}=23770+(172.5)\\St_{low}=239+42.5 ft\\

The elevation is given as

E_{low}=\frac{G_2-G_1}{2L} x^2+G_1x+E_{PVC}\\E_{low}=\frac{2.5-(-1.5)}{2*460} (1.72)^2+(-1.5)*(1.72)+125.45\\E_{low}=124.16 ft

So the lowest point of the curve is at 239+42.5 ft where elevation is 124.16 ft.

3 0
3 years ago
Other questions:
  • Why is my lawn mower not starting?
    9·1 answer
  • What Type of diploma do you need in order To the get into JMU
    12·1 answer
  • More discussion about seriesConnect(Ohm) function In your main(), first, construct the first circuit object, called ckt1, using
    10·1 answer
  • A 500-m^3 rigid tank is filled with saturated liquid-vapor mixture of water at 200 kPa. If 20% of the mass is liquid and the 80%
    11·1 answer
  • Write a statement that increases numPeople by 5. Ex: If numPeople is initially 10, the output is: There are 15 people.
    11·1 answer
  • In the SI system of units, the absolute temperature is measured to be 303 K Its value in Fahrenheit is a-) 76 F b)- 86F c)-79 F
    9·1 answer
  • At the instant shown car A is travelling with a velocity of 24 m/s and which is decreasing at 4 m/s2 along the highway. At the s
    14·1 answer
  • The cylinder C is being lifted using the cable and pulley system shown.
    8·1 answer
  • ) If the blood viscosity is 2.7x10-3 Pa.s, length of the blood vessel is 1 m, radius of the blood vessel is 1 mm, calculate the
    13·1 answer
  • If a material is found to be in the tertiary phase of creep, the following procedure should be implemented:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!