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
postnew [5]
3 years ago
14

Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input ord

er and separated by exactly one space (i.e., if a number appears multiple times, it is displayed only once). After the input, the array contains the distinct numbers. Here is a sample run of the program.
Computers and Technology
1 answer:
Alla [95]3 years ago
8 0

Answer:

Explanation:

The following code is written in Python. It creates a for loop that iterates 10 times, asking the user for a number every time. It then checks if the number is inside the numArray. If it is not, then it adds it to the array, if it is then it skips to the next iteration. Finally, it prints the number of distinct numbers and the list of numbers.

numArray = []

for x in range(10):

   num = input("Enter a number")

   if int(num) not in numArray:

       numArray.append(int(num))

print("Number of Distince: " + str(len(numArray)))

for num in numArray:

   print(str(num), end = " ")

You might be interested in
The combination of two or more technologies or data feeds into a single, integrated tool is referred to as a _____.
igomit [66]
Mash-up, I believe, is the correct answer.
5 0
3 years ago
What is the term for the era created by the digital revolution?<br>​
puteri [66]

Answer:

The Digital Revolution also marks the beginning of the Information Era. The Digital Revolution is sometimes also called the Third Industrial Revolution.

Explanation:

Hope this Helps.

5 0
3 years ago
What addresses do not change if you copy them to a different cell?
Anika [276]

Answer: absolute then relative

Explanation:

7 0
3 years ago
What is a URI (include example)
fenix001 [56]

Answer:

 URI is the uniform resource identifier and it is basically a sequence of the character which identify the physical and logical resources. The uniform resource identifier basically contain the predefined set of rules and syntax and also maintain the extensibility hierarchical schema.

There are basically two types of URI that are:

  1)  Uniform Resource Name (URN)

  2) Uniform Resource Locator (URL)

For example: HTTP protocol , file transfer protocol (FTP).

 

6 0
3 years ago
Write a program that inputs numbers and keeps a
rjkz [21]

I've included my code in the picture below. Best of luck.

3 0
3 years ago
Other questions:
  • "which part of an information system consists of the rules or guidelines for people to follow?"
    9·1 answer
  • Name some of the file extensions for images and provide more information about one or two of them.
    12·1 answer
  • Which of following allows you to share a file with someone that is too large to send via e-mail?
    5·1 answer
  • What should you do prior to writing your business document?
    11·1 answer
  • Jerry’s managing a Google Search campaign and would like to improve the position in which his ads appear. He’s increased his bid
    15·1 answer
  • A computer with a frequency 2 GHZ and its average cycle per instruction is 2. what is the MIPS of the computer?
    6·1 answer
  • Consider the following program where the zu format specifier is used to display as an integer the result of sizeof. #include #in
    11·1 answer
  • What is first page of website called​
    10·1 answer
  • 17. What are the basic modes of operation of 8255?Write the features of mode 0 in 8255?
    8·1 answer
  • 236. A system such as a printer, smart TV, or HVAC controller, typically uses an operating system on what is called a:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!