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
In 2008, researchers at Princeton University demonstrated techniques to retrieve RAM contents after the computer had been powere
lora16 [44]

It’s called a “Cold Boot” attack
6 0
3 years ago
Describe the benefits and drawback of using virtualisation on a single machine and also in a cluster environment
Sedbober [7]

Answer:

 Virtualization is the technology that is used to create virtual representation and version of the different devices like software, many storage devices and server.

It also help in organize the working framework where the structure isolates the asset into at least one execution situations.

 The benefits of using the virtualization on the single machine are:

  •  The virtualization increased the productivity when it used in the cluster environment.
  •  We can able to access the different resources faster.
  •   The data center management is simple while using the virtualization in the cluster environment.

 The drawback of using virtualization on single machine are:

  • The virtual machine is less efficient as compared to the real machines.
  • The virtual machine indirectly access the computer hardware system so that is why it is less efficient and also consume more power to run the system.  

5 0
3 years ago
Question 2 Unsaved Which of these is NOT an example of an emerging technology? Question 2 options: Sixth Sense Close Range Drone
alexandr1967 [171]

The answer is <em>B.) Close Range Drones</em>

I just took the test

3 0
3 years ago
La computadora es un medio de comunicacion moderno?
kolbaska11 [484]
Moderno = mordern, if It does than yes!
3 0
4 years ago
True or false, alcohol tends to produce passive behavior in most people
goldenfox [79]
The answer to your Question is false 

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is &lt;html&gt;
    9·2 answers
  • According to the 2010/2011 Computer Crime and Security Survey, ____ is "the most commonly seen attack, with 67.1 percent of resp
    10·1 answer
  • When the print server processes documents waiting in the queue until the print device is available to accept the print job is ca
    14·1 answer
  • Peter has recently bought a media player and a digital camera he wants to buy a memory card and then use devices which memory do
    11·2 answers
  • You are creating a database for your computer club. Most of the students live in your town, Durham. How can you make Durham appe
    11·1 answer
  • Which platform is the best? (X-box, PC, Playstation, Nintendo Switch, Wii)
    10·1 answer
  • If E=mc2 then what does F equal?
    10·1 answer
  • How do mass and social media differ
    8·1 answer
  • Sistema binario, realizar el pasaje de binario a decimal; 00110011 11101100 11100001 11001100 10010101 11001111 10000001 1000110
    14·1 answer
  • A computer professional's job involves analyzing computer systems for
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!