Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input order 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.

Answers

Answer 1

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 = " ")

Write A Program That Reads In 10 Numbers And Displays The Number Of Distinct Numbers And The Distinct

Related Questions

Here is a nested loop example that graphically depicts an integer's magnitude by using asterisks, creating what is commonly called a histogram: Run the program below and observe the output. Modify the program to print one asterisk per 5 units. So if the user enters 40, print 8 asterisks.num = 0while num >= 0: num = int(input('Enter an integer (negative to quit):\n')) if num >= 0: print('Depicted graphically:') for i in range(num): print('*', end=' ') print('\n')print('Goodbye.')

Answers

Answer:

Please find the code in the attached file.

Output:

Please find the attached file.

Explanation:

In this code a "num" variable is declared that use while loop that check num value greater than equal to 0.

Inside the loop we input the "num" value from the user-end and use if the value is positive it will define a for loop that calculates the quotient value as integer part, and use the asterisks to print the value.

If input value is negative it print a message that is "Goodbye".

Please find the code link:   https://onlinegdb.com/7MN5dYPch2

on a client server network clients and servers usually require what to communicate?​

Answers

Answer:

A connectivity device. Your colleague, in describing the benefits of a client/server network, mentions that it's more scalable than a peer-to-peer network.

Explanation:

Scenario: The Development group in a company wants to setup theirown Child Domain to have full control on managing their accounts and policies. The Main IT group is recommending they are setup with an Organizational Unit, and delegating the appropriate access.Make your case supporting either the Development group or the Main IT group.Computer ScienceEngineering & TechnologyNetworkingIFT 220

Answers

Answer:

(:

Explanation:

You are required to make a carrier with the following details:

Frequency-1 hz/sec

Amplitude - 2

Phase - O degree

Once this carrier has been drawn, please perform the following on the data:

10110010

1. FSK

2. ASK

3. PSK​

Answers

Ok so cool I just saw your post and orange sue

A ___________ consists of a large number of network servers used for the storage, processing, management, distribution, and archiving of data, systems, web traffic, services, and enterprise applications.

Answers

Answer:

Data center

Explanation:

A network service provider can be defined as a business firm or company that is saddled with the responsibility of leasing or selling bandwidth, internet services, infrastructure such as cable lines to both large and small internet service providers.

Generally, all network service providers, internet service providers and most business organizations have a dedicated building or space which comprises of a large number of computer systems, security devices, network servers, switches, routers, storage systems, firewalls, and other network associated devices (components) typically used for remote storage, processing, management, distribution, and archiving of large amount of data, systems, web traffic, services, and enterprise applications.

Furthermore, there are four (4) main types of data center and these includes;

I. Managed services data centers.

II. Cloud data centers.

III. Colocation data centers.

IV. Enterprise data centers.

how data transform into information?​

Answers

Information is when you take the data you have and analyze it or manipulate it by combining it with other data, trending it over time, assessing or analyzing the outliers that need to be dealt with, and, most important, applying your own experience and knowledge to transform that data into something you can use to make

Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0. Implement three derived classes named Rectangle, Square, and Circle. Declare necessary properties in each including getter and setter function and a constructor that sets the values of these properties. Override the area() function in each by calculating the area using the defined properties in that class.

Answers

Answer:

Explanation:

The following code is written in Python. It creates the parent class Shape and the three subclasses Rectangle, Square, and Circle that extend Shape. Shape has the constructor which is empty and the area method which returns 0.0, while the three subclasses take in the necessary measurements for its constructor. Each subclass also has getter and setter methods for each variable and an overriden area() method which returns the shapes area.

class Shape:

   def __init__(self):

       pass

   def area(self):

       return 0.0

class Square(Shape):

   _length = 0

   _width = 0

   def __init__(self, length, width):

       self._width = width

       self._length = length

   def area(self):

       area = self._length * self._width

       return area

   def get_length(self):

       return self._length

   def get_width(self):

       return self._width

   def set_length(self, length):

       self._length = length

   def set_width(self, width):

       self._width = width

class Rectangle(Shape):

   _length = 0

   _width = 0

   def __init__(self, length, width):

       self._width = width

       self._length = length

   def area(self):

       area = self._length * self._width

       return area

   def get_length(self):

       return self._length

   def get_width(self):

       return self._width

   def set_length(self, length):

       self._length = length

   def set_width(self, width):

       self._width = width

class Circle(Shape):

   _radius = 0

   def __init__(self, radius):

       self._radius = radius

   def area(self):

       area = 2 * 3.14 * self._radius

       return area

   def get_radius(self):

       return self._radius

   def set_radius(self, radius):

       self._radius = radius

Calculate the total capacity of a disk with 2 platters, 10,000 tracks, an average of
400 sectors per track, and 512 bytes per sector?

Answers

Answer:

[tex]Capacity = 2.048GB[/tex]

Explanation:

Given

[tex]Tracks = 10000[/tex]

[tex]Sectors/Track = 400[/tex]

[tex]Bytes/Sector = 512[/tex]

[tex]Platter =2[/tex]

Required

The capacity

First, calculate the number of Byte/Tract

[tex]Byte/Track = Sectors/Track * Bytes/sector[/tex]

[tex]Byte/Track = 400 * 512[/tex]

[tex]Byte/Track= 204800[/tex]

Calculate the number of capacity

[tex]Capacity = Byte/Track * Track[/tex]

[tex]Capacity= 204800 * 10000[/tex]

[tex]Capacity= 2048000000[/tex]  --- bytes

Convert to gigabyte

[tex]Capacity = 2.048GB[/tex]

Notice that the number of platters is not considered because 10000 represents the number of tracks in both platters

Paravirtualization is ideal for

Answers

Answer:to allow many programs, through the efficient use of computing resources including processors and memory, to operate on a single hardware package.

Explanation:

At one college, the tuition for a full-time student is $6,000 per semester. It has been announced that the tuition will increase by 2 percent each year for the next five years. Design a program with a loop that displays the projected semester tuition amount for the next five years.

Answers

Answer:grhgrt

Explanation:

The program is an illustration of loops;

Loops are program statements used to perform repetition

The tuition program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the fee

fee = 6000

#The following loop is repeated 5 times

for i in range(5):

   #This calculates the fee, each year

   fee *= 1.02

   #This prints the calculated fee

   print(round(fee,2),end=" ")

Read more about loops at:

https://brainly.com/question/24833629

#SPJ6

Question Statement: Explain the steps needed to the display all the items in a linked list

Answers

Answer:

A list of linked data structures is a sequence of linked data structures.

The Linked List is an array of links containing items. Each link contains a link to a different link. The second most frequently used array is the Linked List.

Explanation:

Create a node class with 2 attributes: the data and the following. Next is the next node pointer.

Create an additional class with two attributes: head and tail.

AddNode() adds to the list a new node:

Make a new node.

He first examines if the head is equal to zero, meaning that the list is empty.

The head and the tail point to the newly added node when this list is vacant.

If the list isn't empty, the new node will be added at the end of the list to point to the new node of tail. This new node is the new end of the list.

Show() will show the nodes in the list:

Set a node current that first points to the list header.

Cross the list until the current null points.

Show each node by referring to the current in each iteration to the next node.

A file system uses a bitmap to keep track of free disk space. One bit represents a 512-byte block. The disk contains 3 files, in the order: A, B, C, with the respective sizes of 1040, 700, 2650 bytes. Which one below is the correct bitmap?

A. 0111000111111 ....
B.1111111100110 ...
C.1011101101100...
D. 1111111111100

Answers

Answer:

B. 1111111100110

Explanation:

Bitmap is the technique for mapping from some domain bits. This is particularly referred to as pix-map which is actually map of pixels and this contains more than two colors. it used more than one bit per pixel. Pixels lesser than 8 will represent gray scale.

Waygate's residential Internet modem works well but is sensitive to power-line fluctuations. On average, this product hangs up and needs resetting every 200 hours. On average about 45 minutes is needed to reset this product. What is this product's availability

Answers

Answer:

The answer is "In excess of 0.95 "

Explanation:

[tex]MTBF= 200\ hours (12,000\ minutes)\\\\MTR= 45\ minutes (0.75\ hours)[/tex]

Availability equation [tex]=\frac{ MTBF}{(MTBF+MTR)}[/tex]  

Calculating the minutes as the common units:

[tex]= \frac{12,000}{(12,000+45)}\\\\= \frac{12,000}{(12,045)}\\\\= 0.9962\\\\= In\ excess\ of\ 0.95[/tex]

Calculating the hours as the common units:

 [tex]= \frac{200}{(200+0.75)}\\\\= \frac{200}{200.75}\\\\= 0.9962\\\\= In \ excess\ of\ 0.95[/tex]

Which language will report a compilation error for the following snippet of code? int i = 3; double n, j = 3.0; n = i + j; Group of answer choices All of the above C++ Java C

Answers

Answer:

None of the programming languages

Explanation:

Given

[tex]int\ i = 3; double\ n, j = 3.0;[/tex]

[tex]n = i + j;[/tex]

Required

Which will produce a compilation error

The given code snippet will pass the syntax test and the semantic test for the three programming languages (C++, Java and C)

In other words, it will compile without error.

The reason is that (for the three programming languages);

Variables (i, n and j) were declared properlyVariables i and j were initialized properlyLastly, the arithmetic operation was also done properly

Hence, none of the programming languages will return an error

What is the key stroke combination for BOLD text?
O Ctrl + B
O Ctrl + D
O Ctrl + H
O Ctrl + M​

Answers

Answer:

Ctrl + B.....................

computer __ is any part of the computer that can be seen and touched​

Answers

Hardware
Answer. physical parts of computer which can be seen and touched are called Hardware.

What term refers the built-in redundancy of an application's components and the ability of the application to remain operational even if some of its components fail

Answers

Answer:

Fault tolerance.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

Simply stated, it's a computer program or application that comprises of sets of code for performing specific tasks on the system.

Fault tolerance is an ability of the component of a software application or network to recover after any type of failure. Thus, it is the redundancy of an application's components built-in by default and the ability of this software application to remain functional or operational even if some of its components fail or it encounter some code blocks.

Basically, fault tolerance makes it possible for a software application or program to continue with its normal operations or functions regardless of the presence of hardware or system component failure.

Hence, it is an important requirement for any software application that should be incorporated by software developers during the coding stage of the software development life cycle (SDLC).

Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape (How many of the selected shape user wants to create). The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.

Answers

Answer:

Explanation:

The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.

Both symmetric and asymmetric encryption methods have their places in securing enterprise data. Compare and contrast where each of these are used in real-life applications. Use at least one global example in identifying the differences between applications.

Answers


Symmetric Encryption:

Same key is used for Encryption and Decryption

Both server and client should have same key for encryption

Vulnerable to attack

Examples: Blowfish, AES, RC4, DES, RC5, and RC6

Asymmetric encryption:

Server generates its own public and private key

Client generates its own public and private key

Server and client exchanges their public keys

Server uses client’s public key to encrypt data

Client uses server ‘s public key to encrypt data

Server uses its private key to decrypt data sent by client

Client uses its private key to decrypt data sent by server

example: EIGamal, RSA, DSA, Elliptic curve techniques, PKCS.

Hi there , Hope I helped !

Calculate the boiling point of 3.42 m solution of ethylene glycol, C2H602, in water (Kb =0.51°C/m, the normal boiling point of water is 100°C):​

Answers

Answer:

128.10 degree Celsius

Explanation:

The boiling point is given by

[tex]T_b = \frac{1000*K_b * w}{M*W}[/tex]

Substituting the given values, we get -

[tex]T_b = \frac{1000*0.51 * 3.42}{62.07}\\T_b = 28.10[/tex]

Tb is the change in temperature

T2 -T1 = 28.10

T2 = 28.10 +100

T2 = 128.10 degree Celsius

Calculate the total capacity of a disk with 2 platters, 10,000 tracks, an average of
400 sectors per track, and 512 bytes per sector?

Answers

Answer:

[tex]Capacity = 2.048GB[/tex]

Explanation:

Given

[tex]Tracks = 10000[/tex]

[tex]Sectors/Track = 400[/tex]

[tex]Bytes/Sector = 512[/tex]

[tex]Platter =2[/tex]

Required

The capacity

First, calculate the number of Byte/Tract

[tex]Byte/Track = Sectors/Track * Bytes/sector[/tex]

[tex]Byte/Track = 400 * 512[/tex]

[tex]Byte/Track= 204800[/tex]

Calculate the number of capacity

[tex]Capacity = Byte/Track * Track[/tex]

[tex]Capacity= 204800 * 10000[/tex]

[tex]Capacity= 2048000000[/tex]  --- bytes

Convert to gigabyte

[tex]Capacity = 2.048GB[/tex]

Notice that the number of platters is not considered because 10000 represents the number of tracks in both platters

True or false a mirrorless camera has a pentaprism

Answers

Answer:

No the pentaprism or pentamirror are both optical viewfinder viewing systems and are not part of the mirrorless camera. Some thing the pentaprism actually operates better than the electronic viewfinder of mirrorless cameras.

Explanation:

False, I think it’s false

What aspect should you consider before adding pictures to a document?

You should structure the BLANK first before you search for a relevant picture.

Answers

Answer:

You should structure the text first before you search for a relevant picture.

Explanation:

When adding a picture or pictures to a text document, the structure of the text must be considered.

Structure as used in the above sentence means (but is not limited to), the headings, the layouts, the spacing, paragraphs and word formatting in the document.

In other words, the way the document is organized

All these must be put in to place before one adds pictures into the document.

Create a static method that: - is called appendPosSum - returns an ArrayList - takes one parameter: an ArrayList of Integers This method should: - Create a new ArrayList of Integers - Add only the positive Integers to the new ArrayList - Sum the positive Integers in the new ArrayList and add the Sum as the last element For example, if the incoming ArrayList contains the Integers (4,-6,3,-8,0,4,3), the ArrayList that gets returned should be (4,3,4,3,14), with 14 being the sum of (4,3,4,3). The original ArrayList should remain unchanged.

Answers

Answer:

The method in Java is as follows:

public static ArrayList<Integer> appendPosSum(ArrayList<Integer> nums) {

   int sum = 0;

   ArrayList<Integer> newArr = new ArrayList<>();

   for(int num : nums) {

       if(num>0){

           sum+=num;

           newArr.add(num);        }    }

   newArr.add(sum);

   return newArr;

 }

Explanation:

This defines the method; it receives an integer arraylist as its parameter; nums

public static ArrayList<Integer> appendPosSum(ArrayList<Integer> nums) {

This initializes sum to 0

   int sum = 0;

This declares a new integer arraylist; newArr

   ArrayList<Integer> newArr = new ArrayList<>();

This iterates through nums

   for(int num : nums) {

If current element is greater than 0

       if(num>0){

This sum is taken

           sum+=num;

And the element is added to newArr

           newArr.add(num);        }    }

At the end of the iteration; this adds the calculated sum to newArr  

newArr.add(sum);

This returns newArr

   return newArr;

 }

A scheduler needs to determine an order in which a set of processes will be assigned to processor. Theith process requirestiunits of time and has weightwi. For a given schedule, definethe finish time of processito be the time at which processiis completed by the processor. (Assumethat the processor starts processing the tasks at time 0.)

Answers

Answer:

d

Explanation:

Security monitoring has detected the presence of a remote access tool classified as commodity malware on an employee workstation. Does this allow you to discount the possibility that an APT is involved in the attack

Answers

Answer:

No it doesn't

Explanation:

Targeted malware can be linked to such high resource threats as APT. Little or nothing can be done to stop such advanced persistent threats. It is necessary to carry out an evaluation on other indicators so that you can know the threat that is involved. And also to know if the malware is isolated or greater than that.

How much data do sensors collect?

Answers

Answer:

2,4 terabits (TB) of data every minute. Sensors in one smart-

Mining safety sensors may create up to 2.4 terabits (TB) of data every minute.

What is the significance of sensors?

Sensors can help to improve the world by improving diagnostics in medical applications, the performance of energy sources such as fuel cells, batteries, and safety, solar power, people's health, and security, sensors for exploring space and the known university, and improved environmental monitoring.

Sensors play an important role in industrial applications such as process control, monitoring, and safety. The change in sensor output compared to a unit change in input is measured as sensitivity.

It provides several advantages, including increased sensitivity during data gathering, practically lossless transmission, and continuous, real-time analysis.

Real-time feedback and data analytics services ensure that processes are operational and being carried out optimally. Sensors in a single smart-connected house may generate up to 1 gigabit (GB) of data every week.

Learn more about the sensors, refer to:

https://brainly.com/question/15396411

#SPJ2

Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, if the amount is 86 cents, the output would be something like the following:

86 cents can be given as 3 quarters 1 dime and 1 penny

Use coin denominations of 25 cents (quarters), 10 cents (dimes), and 1 cent (pennies). Do not use nickel and half dollar coins. Your program will use the following function (among others):
void computeCoin(int coinValue, int& number, int& amountLeft);

For example, suppose the value of the variable amountleft is 86. Then, after the following call, the value of number will be 3 and the value of amountLeft will be 11 (because if oyu take three quarters from 86cents, that leaves 11 cents):
computecoins (25, number, amountLeft);

Include a loop that lets the user repeat this computation for new input values until the suer says he or she wants to end the program (Hint: use integer division and the % operator to implement this function.)

Answers

Add all numbers up

and you will get your sum

Write a program whose inputs are three integers, and whose output is the smallest of the three values. Ex: If the input is: 7 15 3 the output is: 3

Answers

Answer:

The  program in Python is as follows:

nums = []

for i in range(3):

   num = int(input(""))

   nums.append(num)

   

print(min(nums))

Explanation:

This initializes a list of numbers

nums = []

This loop is repeated 3 times

for i in range(3):

For each repetition, this prompts the user for input

   num = int(input(""))

This appends the input to the list

   nums.append(num)

This gets the smallest of the three inputs using the min() function. The smallest is also printed

print(min(nums))

The Answer is in Bold:

#include <iostream>

using namespace std;

int main() {

 

  int  a, b, c;      //NOTE: you don't have to put a, b, c. you can put it as x, y, z

                                       //or you can make it as num1, num2, num3 etc.

  cin >> a;        

  cin >> b;

  cin >> c;

 

  if (a < b && a < c)   {            

     cout << a <<endl;              

  }                                                    

  else if(b < a && b < c)   {      

     cout << b << endl;

  }

  else   {

     cout << c <<endl;

  }    

  return 0;

}

Mainframe computers are multi-programming, high-performance computers, and multi-user, which means it can handle the workload of more than 100 users at a time on the computer.

a. True
b. False

Answers

Answer:

a. True

Explanation:

A computer can be defined as an electronic device that is capable of receiving of data in its raw form as input and processes these data into information that could be used by an end user. Computers can be classified on the basis of their size and capacity as follows;

I. Supercomputers.

II. Mainframe computers.

III. Mini computers.

IV. Micro computers.

Mainframe computers were developed and introduced in the early 1950s.

Mainframe computers are specifically designed to be used for performing multi-programming because they are high-performance computers with the ability to handle multiple users. As a result, it simply means that mainframe computers can be used to effectively and efficiently perform the work of over one hundred (100) users at a time on the computer. Some examples of mainframe computers include the following; IBM Es000 series, CDC 6600 and ICL39 Series.

Furthermore, mainframe computers are mostly or commonly used by large companies, business firms or governmental institutions for performing various complex tasks such as census, financial transactions, e-commerce, data sequencing, enterprise resource planning, etc.

Answer:

a. True

Explanation:

A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications, bulk data processing (such as the census and industry and consumer statistics, enterprise resource planning, and large-scale transaction processing).

Other Questions
what did the three-fifths compromise at the constitutional convention determine show work if u can please I dont understand stand this can somebody please help me water molecules stick to nearby water molecules due to Evaluate the expression (ab)^2for a = 4 and b = 3. Select a poem that expresses emotions. You can search for a poem online or in your local library. Poetry Foundation is a good website to begin your search. If you need help searching for a poem, ask your teacher. Once you have found a poem, show it to your teacher for approval. Which poem did you select? Who authored the poem? diamond problems pls help What is 2 (54 + 5 (24 in simplified radical form?Please explain :) what is the NGOs location in Nigeria Escucha las definiciones y elige la profesin adecuada que est descrita (described) electricista consejero/a contador(a) In a closed economy, saving and investment must be equal, but this is not the case in an open economy. In the following problem, you will explore how saving and investment are connected to the international flow of capital and goods in an economy. Before delving into the relationship between these various components of an economy, you will be asked to recall some relationships between aggregate variables that will be useful in your analysis. Recall the components that make up GDP. National income (Y) equals total expenditure on the economy's output of goods and services. Thus, where C = consumption, I = gross investment, G = government spending, and NX = net exports, Y is defined as follows: Y =_____National saving (S) is the income of the nation that is left after paying for government spending and consumption. Therefore, S is defined as follows: S =_____Re-arranging the previous equation and solving for Y yields Y =____. Plugging this into the original equation showing the various components of income results in the following relationship: S =_____This is equivalent to S =____, since net exports must equal net capital outflow (NCO, also known as net foreign investment).Now suppose that a country is experiencing balanced trade. Determine the relationships between the entries in the following table and enter these relationships using the following symbols: > (greater than), < (less than), or = (equal to). Outcomes of Balanced Trade Net Exports 0Exports Imports Y C + I + G Saving Gross InvestmentNet Capital Outflow 0 If f (2) is an exponential function where f(-2.5) = 9 and f(7) = 91, then findthe value of f(12), to the nearest hundredth. the marked prce of an article is rs2800 which is 40% above the cost price if it sold by allowing 20% discount.find of profit and loss Which equation represents the graphed function? O y = -3x + 3 O y = 3x - 3 O y = 3x - 2 / 2 O y=-*x+3 brainly- How does littering affect humans? ano ang simbolismo ng tahana ni kabesang tales The process for converting present values into future values is called________________. ____ Is the amount of money owed in addition to the original amountAPRInterestAPYPrincipal When ringing up a customer, a cashier needs 18 seconds to process payment as well as 1 second to scan each item being purchased. If it takes 20 seconds to ring up a customer, how many items are being purchased? ermm help mee how do i reply to her