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
Oxana [17]
3 years ago
15

Design a loop that asks the user to enter a number. The loop should iterate 10

Computers and Technology
1 answer:
yarga [219]3 years ago
4 0

There are actually a couple of questions in here. I'll try to answer them in Python, which kind of looks like psuedocode already.

1. Design a loop that asks the user to enter a number. The loop should iterate 10 times and keep a running total of the numbers entered.

Here, we declare an empty array and ask for user input 10 times before printing a running total to the user's console.

<em>numbers = [] </em>

<em>for i in range(10): </em>

<em>    numbers.append(input("number: "))  </em>

<em>print(f"running total: { ', '.join(numbers) }")</em>

<em />

2. Design a program with a loop that lets the user enter a series of numbers. The user should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.

Here, we declare an empty array and ask for user input forever until the user types -99. Python makes it really easy to get the min/max of an array using built-in functions, but you could also loop through the numbers to find the smallest as well.

<em>numbers = [] </em>

<em>while True: </em>

<em>    n = int(input("number: ")) </em>

<em>    if n == -99:  </em>

<em>        break </em>

<em>    numbers.append(n) </em>

<em>print(f"largest number: { max(numbers) }")   </em>

<em>print(f"smallest number: { min(numbers) }")    </em>

<em />

You might be interested in
Can you please look through this code and see wants wrong with it? its in python
Ivanshal [37]
I’m confused what are you trying to ask? What is the python?
3 0
3 years ago
F(x) = -x^3-x<br> Is this function odd?
Crank

Answer:

yes it is odd beacuse 3 is a odd number

6 0
3 years ago
Read 2 more answers
3. This shows you the different things that all the tools can do, as you click on the tools
leva [86]
D that’s the answer I learn that in my old school
7 0
3 years ago
(TCO B) The symbol shown as a three-sided box that is connected to the step it references by a dashed line is what?
Mekhanik [1.2K]

Answer:

Annotation symbol

Explanation:

A flowchart is a diagram that is used to show and represent a workflow, process or algorithm. Flow charts are used in designing processes or programs. Flow charts are usually designed using boxes and arrows.

An annotation symbol is a symbol used in flowchart to hold comments and it is usually represented by a three-sided box connected to the step it references by a dashed line.

7 0
3 years ago
Why are rules required for a number system to be useful?
evablogger [386]

Answer

This is because without them no one would know how much each symbol represents, and no one would be able to decipher the message.

Explanation

Number system is a way to represent numbers. It  is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner.

In computing or in a computer number systems are the techniques which represents numbers in the computer system architecture where   every value that you are saving or getting into/from computer memory has a defined number system.Computer architecture supports  . Binary number system,Octal number system and Decimal number system.

5 0
3 years ago
Read 2 more answers
Other questions:
  • An expression that has correctly paired delimiters is called a(n)
    6·1 answer
  • A _____ captures the pattern in a _____ and sends it to the computer, where special software translates the _____ into meaningfu
    8·1 answer
  • When you first start your computer, which software will have to start first?
    5·2 answers
  • In fixed-width files, each record is on a separate line and the fields are separated by a special character.
    7·1 answer
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • Which cell formatting is most likely to use $?
    5·1 answer
  • Which data type is also called a binary object?
    9·2 answers
  • Besides earning money why do people work​
    6·2 answers
  • The system where the unit of measurement is centimeter
    15·1 answer
  • imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!