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

Write and test a Python program to find and print the smallest number in a set of integer numbers. The program should read input

numbers until it reads a negative number. The negative number serves as a sentinel or marker telling the program when to stop reading numbers. The smallest of all numbers input as well as how many numbers were read (not considering the sentinel number) should be printed.
Computers and Technology
1 answer:
NikAS [45]3 years ago
6 0

Answer:

numbers = []

count = 0

while True:

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

   if number < 0:

       break

   else:

       numbers.append(number)

       count += 1

min_number = min(numbers)  

print(str(min_number) + " was the smallest among " + str(count) + " entered numbers.")

Explanation:

Initialize an empty array, to hold the entered numbers, and count as 0

Create a while loop that iterates until a specific condition is met

Inside the loop, ask the user to enter the numbers. When the user enters a negative number terminate the loop. Otherwise, add the entered number to the numbers array and increment the count by 1.

When the loop is done, find the smallest of the number in the numbers array using min method and assign it to the min_number.

Print the min_number and count

You might be interested in
If you turn your volume to loud on u'r headphones can it break the sound quality of the speaker?
zzz [600]
Yes, it is possible to "blow the speaker" in your headphones by listening to loud music (such as high BPM stuff, like extratone or extremely bass-ey stuff)
7 0
3 years ago
Read 2 more answers
5. Why are female fans particularly valuable to the sports industry? Cite two<br> specific reasons.
shusha [124]

Answer:Females make up a large part of the market. The female fans often times spend more on things and have a greater amount of it, so if they are able to target them, they have a gained a large amount of the market

Explanation:

hope it helps

7 0
3 years ago
Which of the following is most likely to include technical vocabulary?
Step2247 [10]
<span>C. a scientific article</span>
6 0
3 years ago
To provide for unobtrusive validation, you can install the ____________________ package for unobtrusive validation.
NARA [144]

Answer:

AspNet.ScriptManager.jQuery?

Explanation:

Unobtrusive validation means we can perform a simple client-side validation without writing a lot of validation code by adding suitable attributes and also by including the suitable script files.

One of the benefits of using a unobtrusive validation is that it help to reduce the amount of the Java script that is generated. We can install the AspNet.ScriptManager.jQuery? for the unobtrusive validation.

When the unobtrusive validation is used, validation of the client is being performed by using a JavaScript library.

4 0
3 years ago
You decide to bulk upload your multiple business locations to Google My Business. Some of the locations in your upload were disa
koban [17]

Complete Question: You decide to bulk upload your multiple business locations to Google My Business. Some of the locations in your upload were disapproved. Which two errors can cause this issue? (Choose two.)

A    Missing listing photos

B  Late listing registration

C   Multiple locations in one physical address

D  Too many listing users

E  Incorrect business name

Answer:

C) Multiple locations in one physical address

E) Incorrect business name

Explanation:

Google provides a service called Google My Business which allows users  with the aid of special tools create, update and maintain their business profiles on the internet. In this way, users are able to build free simple websites and publish posts to engage their customers more effectively.

In the process of signing up for this service, new users are required to verify their business names and physical locations, In the given question a user trying to upload multiple business locations will not get approval if he uploads Multiple locations in one physical address or enters an Incorrect business name.

4 0
3 years ago
Other questions:
  • When did the silver market drop sharply, hurting Bolivia's income?
    7·2 answers
  • Using the bitwise AND operation, the result of 1 AND 0 is ___________. 10100100 ___________ 11010101 = 01110001. A common way to
    15·1 answer
  • Which forensics tool would you use to reveal recent pages viewed via the internet explorer browser?
    10·1 answer
  • What image format should be used to keep the file size manageable​
    14·1 answer
  • The invention of the transistor was important to the development of computers because
    14·1 answer
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • Public classes are accessible by all objects, which means that public classes can be ____, or used as a basis for any other clas
    10·2 answers
  • Name:
    11·1 answer
  • You can resize a row in a table by dragging the ____.
    13·1 answer
  • This seems like a good time to ask the basic question, “How’s it going in class?” Feel free to offer constructive feedback about
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!