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
Sometimes, fourth-generation languages (4GLs) are called procedural languages
irakobra [83]
Hi!

In 1981, the term 4GL was actually used to refer to languages which were <em>non-procedural. </em>A procedural language does not possess <em>object-oriented </em>capabilities. 4GL's often times have OOP properties, so I believe the answer to this question is going to be <em>false. </em>=)
7 0
3 years ago
How to drive more website traffic?
lidiya [134]

Hello there,

How to drive more website traffic?

Answer: Advertise

8 0
4 years ago
You have been tasked with ensuring that access to certain server managed resources is only available to client devices with TPM
elixir [45]

Answer:

Device Health Attestation Services

Explanation:

Based on the scenario being described it can be said that the Windows Server role that can be used to automate this check is known as Device Health Attestation Services. This is a role that allows the administrator to automatically check if a device has the required trustworthy BIOS, TPM, or boot software enabled, as well as Bitlocker encryption.

7 0
3 years ago
How operands are fetched from or stored into memory using different ways?
Mila [183]
<span>The operand is part of the instruction and is fetched from code memory following the instruction opcode.
</span><span>The value is stored in memory, and the specific address is held in a register</span>
6 0
4 years ago
What is an Agile perspective on errors and mistakes in project development?
Minchanka [31]

Answer:

Mistakes can be caught early by working in short spurts that allow for immediate review, learning and adjustment. :)

3 0
3 years ago
Other questions:
  • The ____ section of the project plan should describe the major project functions and activities and identify those individuals w
    7·1 answer
  • In order to prevent unauthorized access, how can the shadow file be configured to enforce a password policy?​ What happens to ac
    6·1 answer
  • What was the first carbonated drink to be introduced in the US?
    6·1 answer
  • Which items may interfere with a wireless connection and may cause disruptions or delays in submitting assignments in blackboard
    9·2 answers
  • Convert the following pseudocode to C++ code. Be sure to define the appropriate variables. Store 25 in the speed variable. Store
    5·1 answer
  • ​User documentation _____. Group of answer choices ​allows users to prepare overall documentation, such as process descriptions
    9·1 answer
  • Define Class in C++. Briefly discuss.
    9·1 answer
  • How to be fluent in computer
    10·2 answers
  • Arrange the computers in the order fastest to slowest: Minicomputer, Supercomputer, Personal Computer and Mainframe.
    9·1 answer
  • missy just hired a software development team to create an educational simulation app for a high school course. she has specific
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!