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
AleksAgata [21]
3 years ago
12

Write a program to input 6 numbers. After each number is input, print the biggest of the numbers entered so far.

Engineering
1 answer:
likoan [24]3 years ago
4 0

Answer:

P<u>rogram:</u>

# Enter Numbers #

number1 = int(input("Enter number: " ))

print("Largest: " + string(number1))

#for num 2 #

number2 = int(input("Enter a number: "))

if number2 > number1:

 print("Largest: " + string(number2))

else:

 print("Largest: " + string(num1))

#for num 3 #

number3 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3)))  

#for num 4 #

number4 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4)))

#for num 5 #

number5 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5)))

#for num 6 #

number6 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5, number6)))        

# END #

You might be interested in
A computer has a two-level cache. Suppose that 60% of the memory references hit on the first level cache, 35% hit on the second
Andreyy89

Answer:

t=14ns

Explanation:

We make the relation between the specific access time and the memory percentage in each level, so

60\% \Rightarrow 60/100 = 0.60\\35\% \Rightarrow 35/100 = 0.35\\05\% \Rightarrow 05/100 = 0.05

t= 0.6(5) + 0.35(5+15) + 0.05(5+15+60)\\t= 0.6(5) + 0.35(20) + 0.05(80)\\t= 3 + 7 + 4\\t= 14 ns

Average Access Time is 14 nsec.

4 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
Explicar el funcionamiento de un multímetro analógico.
Whitepunk [10]

Answer:

Un multímetro analógico funciona como un medidor de bobina móvil de imán permanente (PMMC) para tomar mediciones eléctricas

Explanation:

El multímetro analógico es un medidor o galvanómetro D'Arsonval que funciona según el principio de los medidores de bobina móvil de imán permanente (PMMC)

Un multímetro analógico está formado por un puntero de aguja unido a una bobina móvil colocada entre el polo norte y sur de un imán permanente dispuesto de tal manera que, cuando una corriente eléctrica fluye a través de la bobina, genera una fuerza de campo magnético que interactúa con el imán fuerza de campo de los imanes permanentes que hace que la bobina se mueva junto con el puntero de la aguja sobre un dial graduado

Para controlar el movimiento del puntero de la aguja, de modo que el par requerido para producir una cantidad de movimiento por corriente detectada por el multímetro, se colocan dos resortes a través de la bobina para proporcionar resistencia al movimiento en ambas direcciones y para permitir la calibración del multímetro analógico.

4 0
3 years ago
At the instant shown, slider block B is moving with a constant acceleration, and its speed is 150 mm/s. Knowing that after slide
Xelga [282]

Answer:

a) aA = - 13.33 mm/s²

aB = - 20 mm/s²

b) aD = - 13.33 mm/s²

c) vB = 70 mm/s

d) xB = 440 mm

Explanation:

Given

The initial speed of B is: v₀B = 150 mm/s

Distance moved by A is: xA = 240 mm

Velocity of A is: vA = 60 mm/s

Assuming:

Displacement of blocks are denoted by:

A = xA

B = xB

C = xC

D = xD

From the pic shown, the total length of the cable is:

xB + (xB - xA) + 2*(d - xA) = L

⇒ 2*xB - 3*xA = L - 2*d

where L - 2*d is constant. Differentiating the above equation with respect to time:

d(2*xB)/dt - d(3*xA)/dt = 0

⇒ 2*vB - 3*vA = 0    (i)

Substituting in equation (i)

2*(150 mm/s) - 3*vA = 0

⇒ v₀A = 100 mm/s  (initial speed of A)

Then, we use the equation

vA² = v₀A² + 2*aA*xA

Substituting the values in above equation:

(60 mm/s)² = (100 mm/s)² + 2*aA*(240 mm)

⇒ aA = - 13.33 mm/s²

If  2*vB - 3*vA = 0

Differentiating the above equation with respect to time:

d(2*vB)/dt - d(3*vA)/dt = 0

⇒ 2*aB - 3*aA = 0    (ii)

Substituting in equation (ii)

2*aB - 3*(- 13.33 mm/s²) = 0

⇒ aB = - 20 mm/s²

b) From the pic shown,

xD - xA = constant

If we apply

d(xD)/dt - d(xA)/dt = 0

⇒ vD - vA = 0

then

d(vD)/dt - d(vA)/dt = 0

⇒ aD - aA = 0

⇒ aD = aA = - 13.33 mm/s²

c) We use the formula

vB = v₀B + aB*t

Substituting the values in above equation:

vB = 150 mm/s + (- 20 mm/s²)*(4 s)

⇒ vB = 70 mm/s

d) We apply the equation

xB = v₀B*t + 0.5*aB*t²

Substituting the values in above equation:

xB = (150 mm/s)*(4 s) + 0.5*(- 20 mm/s²)*(4 s)²

⇒ xB = 440 mm

4 0
3 years ago
The mechanical advantage of a screw is always ____________________ than/to 1. Question 5 options: less, greater, equal, none of
torisob [31]

Answer:well u can use to make a shelter but that's all I can think of ??

Explanation:

3 0
3 years ago
Other questions:
  • Remy noticed that after oiling his skateboard wheels, it was easier to reach the speeds he needed to perform tricks. How did the
    6·1 answer
  • The boiler pressure is 38bar and the condenser pressure 0.032 bar.The saturated steam is superheated to 420 oC before entering t
    8·1 answer
  • A fluid has a dynamic viscosity of 0.048 Pa.s and a specific gravity of 0.913. For the flow of such a fluid over a flat solid su
    10·1 answer
  • What is the difference between a job and a profession
    9·1 answer
  • How much work is performed if a 400 lb weight is lifted 10 ft ?
    8·1 answer
  • An air-standard cycle with constant specific heats at room temperature is executed in a closed system with 0.003 kg of air and c
    15·1 answer
  • Module 42 Review and Assessment
    7·1 answer
  • If these components have weights WA = 50000 lb , WB=8000lb, and WC=6000lb, determine the normal reactions of the wheels D, E, an
    14·1 answer
  • A plane wall of thickness 2L = 40 mm and thermal conductivity k = 5 W/m K experiences uniform volumetric heat generation at a ra
    15·1 answer
  • Using the tables for water, determine the specified property data at the indicated states. In each case, locate the state on ske
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!