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]
2 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]2 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
What runs horizontally and is identified with numbers?
kramer
D. the answer is Column 
6 0
3 years ago
Read 2 more answers
Computer professionals known as software engineers, or Blank______, use the software development life cycle to create software r
Aloiza [94]

Answer:

Computer professionals known as software engineers, or programmers use the software development life cycle to create software required for information systems.

Explanation:

Computer professionals are called software engineers and programmers because they develop and program software. Some additional titles for computer professionals are hardware engineers and iOS/Android developers.

5 0
2 years ago
Have you ever been presented to someone else's home page of a given website?​
worty [1.4K]

Answer: No, is this the question?

Explanation: Have a stupendous day! <3

6 0
3 years ago
What is the reddish-brown substance in the water?
Mariulka [41]

Answer:

iron

Your water might be affected by iron, which is a commonly-occurring constituent of drinking water. Iron tends to add a rusty, reddish-brown (or sometimes yellow) color to water. If the color is more black than red, your water might contain a combination of iron and manganese.

5 0
3 years ago
Read 2 more answers
The process of ensuring that web pages coded with new or advanced techniques still are usable in browsers that do not offer supp
Leya [2.2K]

Answer:

(C) progressive enhancement

Explanation:

Progressive enhancement is a web design technique that first underlines the main functionality web page and then incorporates increasingly enhanced and advanced features and design levels.

This process enables the users to use and access the basic features of the web pages. These users can use any browser to access the main contents of the web page. Progressive Enhancement also offers an advanced version of the website for those with more advanced and sophisticated computer browsers or faster internet connection.

So the user can access basic features of a web sites as well as the complex features. This process first makes sure the basic intended purpose and main contents of the web site is accessible to all users before adding complex features which are supported by different browsers and devices.

Validation is a process which checks that code of the website is as per the world wide web standards and also checks that content of web pages and design of websites is being properly displayed and the site is accessible. So this is not the correct option.

Technique of altering a web site in a way that it can appear higher in the search engine results is called optimization so this is not a correct option.

7 0
3 years ago
Other questions:
  • type the correct answer in the Box spell the words correctly Caleb is working on a simple logic base program to stimulate the ga
    5·2 answers
  • Which strategy are you using when you only read the title, section headings, and captions?
    12·2 answers
  • Network administrators ____ to set up the browsers on the network to use a proxy server.
    12·1 answer
  • A URL suffix is called a domain name.
    11·1 answer
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • Tips for being confident and entertaining when presenting?
    6·1 answer
  • Which of the following is not a key way that a LAN shares
    15·1 answer
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
  • Quired to the weight
    12·1 answer
  • What technology does kroger’s edge technology and amazon’s just walk out technology leverage?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!