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
Select the correct answer from each drop-down menu.
lys-0071 [83]

Answer: A and C

Explanation:I did it before

6 0
3 years ago
Anyone wanna hop on 1v1.lol<br> party code : usfhb6
hjlf

Answer:

thx for the points

Explanation:

8 0
2 years ago
Read 2 more answers
Which one of these is not an area of AI? Computer vision/image, recognition Voice recognition, Robotics, Web design
Verdich [7]

Answer:

Computer vision/image

6 0
3 years ago
Read 2 more answers
List some of the cautions related to costume change
Volgvan

Answer:

Costume Change?

Explanation:

You might not have enough time to complete the costume and it may look a little sloppy. Also, if you are in a play, everyone must be notified of the change.

4 0
2 years ago
Type the correct answer in the box. Spell all words correctly.
erica [24]

Answer:

Router

Explanation:

Routers have something called a WAN link, which can be used to connect 2 local area networks

7 0
3 years ago
Other questions:
  • Write a program that determines a student's letter grade. Allow the user to enter three test scores. The maximum score on each t
    9·1 answer
  • Where could an identity theft access your personal information?
    9·2 answers
  • Give the algorithm and flowchart for following C code:
    6·1 answer
  • ​open-source software is​ ________.
    11·1 answer
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • Which tasks can be completed using the Chart Tools Design tab? Check all that apply.
    5·1 answer
  • You should always assign the Needs Met rating before assigning the Page Quality rating, T or F ?
    6·2 answers
  • Which best describes how a supporting database will be structured?
    10·1 answer
  • Identify 5 internal and external hardware components of a server
    5·1 answer
  • Which option will be used to attach email messages ​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!