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
Yuliya22 [10]
3 years ago
12

Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smalle

st and largest integers in the list.
Ex: If the input is:

10
5
3
21
2
-6
the output is:

2 and 21
Computers and Technology
1 answer:
Aleks [24]3 years ago
7 0

n = 1

lst = []

while n > 0:

   lst.append(n := int(input()))

lst.pop(-1)

print(str(min(lst)) +" and "+str(max(lst)))

I wrote this code in python 3.8. I hope this helps

You might be interested in
Instructions (software) that allow a computer (hardware) to be used are written using specific symbols, letters and numbers know
aleksandrvk [35]

Answer:

Option D : language

Explanation:

In simple words, programming language is just a set of instructions written to tell a computer to perform some specific tasks. The most common programming languages that we use are high-level languages such as Java, Python, C++, Ruby and Rail, C# and etc.

Besides, there are some specific grammatical rules or syntax for each programming language. This means a program is not written in an arbitrary way without following a specific structure. A programmer will need to learn and understand the grammatical rule for that particular language before he can build a program.

5 0
4 years ago
Which are emotional effects of anxiety? Check all that apply.
IRINA_888 [86]
Panic, worry, and anger. nausea and headache are physical effects
7 0
3 years ago
Read 2 more answers
_______ allows you to add formatting such as shapes and colors to text.
Svetach [21]
Worddesign allows you to add formatting such as shapes and colours to text
7 0
4 years ago
failed logins or instances of denial of access to restricted files may be indicators of compromise. suggest where records of suc
algol [13]

As forensic evidence of suspected intrusions on a host system or network, indicators of compromise (IOCs) are used.

<h3>What is indicators?</h3>

System administrators and information security (InfoSec) experts can identify malicious activity such as intrusion attempts using these artifacts. IOCs are used by security researchers to more thoroughly examine the methods and behaviour of a certain malware.

IOCs also offer useful threat intelligence that can be disseminated around the community to help organizations develop their incident response and remediation plans.

Some of these artifacts can be seen on the system's event logs, time-stamped entries, apps, and services. Various tools that monitor IOCs are also used by infosec experts and IT/system administrators to help mitigate, if not stop, breaches or assaults.

Therefore, As forensic evidence of suspected intrusions on a host system or network, indicators of compromise (IOCs) are used.

To learn more about indicators, refer to the link:

brainly.com/question/28093573

#SPJ1

4 0
1 year ago
1.Know the BMI of the user. First, the user will input the height in meters and weight in kilograms. After inputting, the inputt
Verizon [17]

The program that checks the BMI of a patient is given below:

<h3>THE CODE</h3>

#include <iomanip>

#include <iostream>

#include <math.h>

using namespace std;

// C++ program to illustrate

// how to calculate BMI

float BMI(float height, float weight)

{

   float bmi = weight / pow(height, 2);

   return bmi;

}

int main()

{

   float height = 1.79832;

   float weight = 70;

   // Function call

  float bmi = BMI(height, weight);

   cout << "The BMI is " << setprecision(15) << bmi

        << " so ";

   // Conditions to find out BMI category

   if (bmi < 18.5)

       cout << "underweight";

   else if (bmi >= 18.5 && bmi < 24.9)

       cout << "Healthy";

   else if (bmi >= 24.9 && bmi < 30)

       cout << "overweight";

   else if (bmi >= 30)

       cout << "Suffering from Obesity";

   return 0;

}

// This code is contributed by aarohirai2616.

<h3>Output: </h3>

The BMI is 21.64532402096181 so Healthy

Read more about algorithms here:

brainly.com/question/24953880
#SPJ1

3 0
1 year ago
Other questions:
  • Suppose that the following regular expression is used to recognize real numbers in scientific notation in a programming language
    14·1 answer
  • Which element in Access is an ideal data source?
    12·2 answers
  • Considers the assets of all things in an environment, and refers to the layering of security tools and methods often varying num
    13·1 answer
  • Tanya is entering the amount of money she has earned from babysitting onto an Excel spreadsheet, but the AutoComplete feature is
    9·2 answers
  • Your organization issues devices to employees. These devices generate one-time passwords every 60 seconds. A server hosted withi
    15·1 answer
  • What does Tristan need to do to add a row at the<br> bottom of the table shown?
    6·1 answer
  • Advancements in nuclear science have led to technological advances which are both harmful and beneficial. Which would be conside
    15·1 answer
  • What is an example of a culture block
    8·1 answer
  • Which feature do we most likely use to quickly change the background, fonts, and layout?
    12·1 answer
  • Write a program that prompts the user for two numbers then outputs the result of dividing the first number by the second number
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!