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
Andre45 [30]
3 years ago
5

Write a program whose inputs are three integers, and whose output is the smallest of the three values. Ex: If the input is: 7 15

3 the output is: 3
Computers and Technology
1 answer:
coldgirl [10]3 years ago
7 0

Answer:

The  program in Python is as follows:

nums = []

for i in range(3):

   num = int(input(""))

   nums.append(num)

   

print(min(nums))

Explanation:

This initializes a list of numbers

nums = []

This loop is repeated 3 times

for i in range(3):

For each repetition, this prompts the user for input

   num = int(input(""))

This appends the input to the list

   nums.append(num)

This gets the smallest of the three inputs using the min() function. The smallest is also printed

print(min(nums))

You might be interested in
You connect three 0.5 volt lights in series. Each light has a resistance of 25ohms. Answer the following.
viktelen [127]
1. 3 times the light voltage, ie., 3*0.5 = 1.5V
2. Total R = 3*25 = 75Ω, V=1.5V, I = V/R = 1.5/75 = 20 mA
3. A 1.5V battery (e.g., an AA battery) with a charge of at least 20mAh. AA batteries should be able to handle this easily.
7 0
3 years ago
If str 1 and str2 are both Strings, which of the following expressions will correctly
Novosadov [1.4K]
Str1==str2 is the answer
3 0
4 years ago
We piped the results of the Get-Process cmdlet to the Sort-Object cmdlet to sort them in descending order. Which property was us
Basile [38]
The answer is yes hope this helps did before
5 0
3 years ago
Write a program that utilizes a loop to read a set of five floating-point values from user input. Ask the user to enter the valu
rjkz [21]

Answer:

Python code is given below

Explanation:

# create an empty array

arr = []

# loop 5 times

for i in range( 0 , 5 ):

   x = float(input('Enter a number : '))

   # add x to arr

   arr.append( x )

sum = 0

# find the sum of all elements in arr

for x in arr:

   sum += x

# calculate average

average = sum / len(arr)

print('\n%15s %15s\n' %('Original Value' , 'Interest Value'))

for Original_value in arr:

   # calculate interesr value

   Interest_Value = Original_value * 0.2

   print('%10f %15f' %( Original_value , Interest_Value ))

print('\nTotal :', sum)

print('Average :', average)

print('Maximum :', max(arr))

print('Miniimum :', min(arr))

3 0
4 years ago
if you want to open up your desktop computer to look inside what is one of the first things you should do
Sunny_sXe [5.5K]
Turn it on or open the laptop
7 0
4 years ago
Other questions:
  • Assume that the main method of the class named Welcome does not contain any compile-time errors. What is the name of the file ge
    11·1 answer
  • How to fix the acount when it says "Uh oh, this account has been restricted because of an unusual amount of activity.
    8·1 answer
  • Who share the road with an impaired driver are at risk
    7·2 answers
  • How many address bits are needed to specify each byte in a 512 byte memory unit?
    5·1 answer
  • A dual looped Fibre Channel drive system is theoretically capable of transferring data at a rate of _____.
    7·1 answer
  • Investigar las oportunidades de empleo y el autoempleo dentro del área de la especialidad<br>​
    14·1 answer
  • Write a MY SQL query to display the name and hire date of all employees who were hired in 1992.
    9·1 answer
  • What are three advantages of using enterprise software in an organization?
    10·1 answer
  • Various types of mouse pointer<br>​
    15·1 answer
  • A(n) ______is like an intranet except it shares its resources with users from a distant location. Select your answer, then click
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!