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
RUDIKE [14]
3 years ago
6

Write a program that prompts the user to enter a series of numbers between 0 and 10 asintegers. The user will enter all numbers

on a single line, and scores will be separatedby spaces. You cannot assume the user will supply valid integers, nor can you assumethat they will enter positive numbers, so make sure that you validate your data. You donot need to re-prompt the user once they have entered a single line of data. Once youhave collected this data you should compute the following: • The largest value • Thesmallest value • The range of values • The mode (the value that occurs the most often) •A histogram that visualizes the frequency of each number Here’s a sample running of theprogram.
Computers and Technology
1 answer:
Anna71 [15]3 years ago
7 0

Answer:

The program in Python is as follows:

import collections

from collections import Counter

from itertools import groupby

import statistics

str_input = input("Enter a series of numbers separated by space: ")

num_input = str_input.split(" ")

numList = []

for num in num_input:

         if(num.lstrip('-').isdigit()):

                   if num[0] == "-" or int(num)>10:

                             print(num," is out of bound - rejecting")

                   else:

                             print(num," is valid - accepting")

                             numList.append(int(num))

         else:

                   print(num," is not a number")

print("Largest number: ",max(numList))

print("Smallest number: ",min(numList))

print("Range: ",(max(numList) - min(numList)))

print("Mode: ",end = " ")

freqs = groupby(Counter(numList).most_common(), lambda x:x[1])

print([val for val,count in next(freqs)[1]])

count_freq = {}

count_freq = collections.Counter(numList)

for item in count_freq:

         print(item, end = " ")

         lent= int(count_freq[item])

         for i in range(lent):

                   print("#",end=" ")

print()

Explanation:

See attachment for program source file where comments are used as explanation. (Lines that begin with # are comments)

The frequency polygon is printed using #'s to represent the frequency of each list element

You might be interested in
Which of the following laptop features allows users to overcome keyboard size restrictions?
nataly862011 [7]

Answer:

C. Fn Key

Explanation:

The Fn key represents the function key that used for the dual purpose. It is to be activated with the help of shift key. Also, it controls the functions of the hardware i.e. brightness of the computer or laptop screen, volume of the speaker, etc

Also, it overcomes the restrictions with respect to the size of the keyboard

hence, the correct option is c.  

5 0
3 years ago
What would be an ideal scenario for using edge computing solutions?
VMariaS [17]

An ideal scenario for using edge computing solutions is when there is a  bad network connection  with IoT devices .

<h3>What is Edge computing ?</h3>

Edge computing can be regarded as the process that involves the  analyes as well as the, and storage of data closer to where it is generated .

This is been done to  enable rapid analysis and response in the process that is been used by some companies  to have consolidated operations , hence, An ideal scenario for using edge computing solutions is when there is a  bad network connection  with IoT devices .

Learn more about edge computing solutions on:

brainly.com/question/23858023

#SPJ1

3 0
2 years ago
You can align controls in the report design window using the align button on the report design tools ____ tab.
Iteru [2.4K]
<span>You can align controls in the report design window using the align button on the report design tools arrange tab.</span> This tab is used to apply different types of formatting to reports in Access. The user<span> can change one type of control layout to another,  can remove controls from layouts so that she/he can position the controls wherever you want on the report.</span>
4 0
3 years ago
You need to pay an Internet Service Provider (ISP) for services rendered. Which payment technology would you use?
-Dominant- [34]

Answer:

D. Electronic Funds Transfer (EFT)

Explanation:

e-commerce is a short for electronic commerce and it can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, e-commerce is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

A payment gateway can be defined as a merchant service technology used for the capturing, acceptance and transfer of digital payment from the bank account of a customer (buyer) to the bank account of the merchant (seller). Thus, payment gateway typically involves the use of credit or debit card for the payment of goods purchased or services provided.

In this scenario, you need to pay an Internet Service Provider (ISP) for services rendered. Thus, the payment technology which you would use is Electronic Funds Transfer (EFT).

3 0
3 years ago
C++
Luden [163]

Answer:

The program to this question as follows:

Program:

//header file iostream

#include<iostream> //including file for use basic function

//using name space

using namespace std;

//main method

int main() //defining main method

{

   int a[3][3]; //defining two dimension array

   int x,y,sum=0; //defining variables

   cout<<"Enter array elements: "<<endl; //message

   for(x=0;x<3;x++) // for row

   {

       for(y=0;y<3;y++) //for column

       {

          cin>>a[x][y]; //input values from user.

       }

       

   }

   //loop for calculting sum.

   for(x=0;x<3;x++)

   {

       for(y=0;y<3;y++)

       {

       sum=sum+a[x][y];//add all elements

       }

       

   }

   cout<<"Sum: "<<sum; //print sum.

   return 0;

}

Output:

Enter array elements:  

1

2

3

4

5

6

7

8

9

Sum: 45

Explanation:

In the above C++ programming language code first, a header file is included then the main method is declared, inside a main method 2D array that is "a[][]", and an integer variable is defined that are "i, j, and sum". In the next line for loop is used, this loop is used two times that can be described as follows:

  • The first time it is used for inserting elements from user ends.  
  • The second time, it uses the sum variable to add all array elements. and in the last print function that is "cout" is used for print sum variable value.
7 0
3 years ago
Other questions:
  • Which is the correct process for adding page numbers to a spreadsheet you will print? A. Click Page Break Preview. Type the page
    7·1 answer
  • Objects falling through air experience a type of friction called.. A.terminal velocity B.air resistance C.rolling friction
    8·1 answer
  • Briefly explain five measures you have undertaken to protect your confidential
    12·1 answer
  • A Silicon Valley billionaire purchases 3 new cars for his collection at the end of every month. Let a_n denote the number of car
    8·1 answer
  • A website's ____ page provides basic information about the individual or organization and includes a navigation bar with links t
    13·1 answer
  • How many times would the following loop iterate?
    15·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • Technical term of stealing personal information in social media.​
    5·1 answer
  • If I got a monitor and kept my garbage laptop could I play games on max graphics?
    13·1 answer
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!