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
What does the following statement do? vector v(10, 2);
Alecsey [184]

Answer:

D) It creates a vector object with a starting size of 10 and all elements are initialized with the value 2.

Explanation:

When you write the statement vector<int> v(10,2); This statement declares a vector or dynamic array of size 10 that is the first parameter and the second parameter is the value with which all the elements in the vector are to be initialized.So in this vector all the 10 values will be initialized with the value 2.It is one of the way of initializing the vector.

3 0
3 years ago
Billy used to take care of his laptop. However, one day he lost his laptop. He lost all his data, and there was no way to retrie
Bad White [126]

Answer: D. He did not create a back up of his data.

Explanation: He lost his data, so he did not back it up in case he lost his laptop.

6 0
3 years ago
What is the difference between auto fill and fill handle ?​
lidiya [134]

Answer:

  • Auto fill a software function that automatically completes data (like the data that has been entered previously) without the user needing to type it in full.

  • The Fill Handle is a feature in Excel that fills the data automatically with a specific pattern in your spreadsheet cell.

hope u liked the answer :)

7 0
2 years ago
Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
nika2105 [10]
The correct answer is a. effective communication

- - -
Ineffective and barriers to communication are problems that make communication unclear. Workplace communication is at work or at a job. This is not a job newsletter for workers, but for people at home.
5 0
3 years ago
Read 2 more answers
What is the benefit of using pre-programmed functions to analyze data?"
Murrr4er [49]

Answer:

A pre-programmed function is a section of code which is reusable to perform certain routine. One benefit of using a pre-programmed function to analyze data is the code redundancy can be reduced. The function is only written for once and it can be called to perform a specific data analysis whenever it is needed.

Besides, a pre-programmed function also offer consistent analytical output as all data are processed by a same analytical procedure in the function.  

5 0
3 years ago
Other questions:
  • What the address for dns server that the eorkstation will use?
    10·1 answer
  • In microsoft windows when a window is minimized what happens to that window
    9·1 answer
  • Which are factors that go into a project plan? choose four answers
    14·1 answer
  • Between Handshake protocol, change cipher suite, alert and appplication data protocols, the first one to use is:
    13·1 answer
  • N, or central processing unit, is also known as the
    10·2 answers
  • A BufferedReader has a constructor that takes a single InputStreamReader parameter. InputStreamReader has a constructor that tak
    8·1 answer
  • Which of the following does your textbook recommend for preparing PowerPoint slides? Group of answer choices
    9·1 answer
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. Certain project
    11·1 answer
  • why does planets orbit the sun? asap i give brainlist i know it on that subject i dont know what else goes with it
    10·1 answer
  • This isn't an academic question, but can anyone help me change the face on my apple watch to a picture from my camera roll? I've
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!