Write a program that repeatedly takes integers from the user as long as he
wants to input. The program then, shows a summary of the inputs. The summary
should include: 1) minimum of the inputs, 2) maximum of the inputs, 3) total Even
inputs , 4) total Odd inputs, 5) Average of Even numbers, 6) Average of Odd
numbers, and 7) the total Average

Answers

Answer 1

Answer:

Written in Python:

evens = 0

odds = 0

oddtotal = 0

eventotal = 0

total = 0

mylst = []

tryag = "Y"

while tryag == "Y" or tryag == "y":

     num = int(input("Input: "))

     mylst.append(num)

     tryag = input("Another Input (Y/y): ")

mylst.sort()

print("Minimum: "+str(mylst[0]))

print("Maximum: "+str(mylst[-1]))

for i in mylst:

     total = total + i

     if i%2 == 0:

           evens = evens + 1

           eventotal = eventotal + i

     else:

           odds = odds + 1

           oddtotal = oddtotal + i

print("Evens: "+str(evens))

print("Odds: "+str(odds))

print("Even Average: "+str(eventotal/evens))

print("Odd Average: "+str(oddtotal/odds))

print("Total Average: "+str(total/(evens+odds)))

Explanation:

The following lines initializes useful variables to 0

evens = 0

odds = 0

oddtotal = 0

eventotal = 0

total = 0

This declares an empty list

mylst = []

tryag = "Y"

This is repeated until user stops the loop by entering strings other than y or Y

while tryag == "Y" or tryag == "y":

This prompts user for input

     num = int(input("Input: "))

User input is appended to the list

     mylst.append(num)

This prompts user to try again the loop

     tryag = input("Another Input (Y/y): ")

This sorts the list from small to large

mylst.sort()

This prints 1. The minimum

print("Minimum: "+str(mylst[0]))

This prints 2. The maximum

print("Maximum: "+str(mylst[-1]))

The following iterates through the list

for i in mylst:

This calculates the total

     total = total + i

This checks for even entry

     if i%2 == 0:

This counts the number of even entries

           evens = evens + 1

This sums the even entries

           eventotal = eventotal + i

     else:

This counts the number of odd entries

           odds = odds + 1

This sums the odd entries

           oddtotal = oddtotal + i

This prints 3. Sum of Even entries

print("Evens: "+str(evens))

This prints 4. Sum of Odd entries

print("Odds: "+str(odds))

This prints 5. Average of Even entries

print("Even Average: "+str(eventotal/evens))

This prints 6. Average of Odd entries

print("Odd Average: "+str(oddtotal/odds))

This prints 7. Total Average

print("Total Average: "+str(total/(evens+odds)))


Related Questions

This is the department that is responsible for hiring, firing, training, new employees for the business or corporation.
Group of answer choices

Human Resources

Information Technology

Advertising

Marketing

Answers

Answer:

Explanation:

human resources

hoped this helped

What question did the use of a telescope by Hubble answer?

A

Is Earth the center of the universe


B

Is the sun the center of the universe


C

How do the planets move in the solar system


D

Are there more galaxies beyond the Milky Way

Answers

Answer:

The Answer is D

Type the correct answer in the box. Spell the word correctly.
Under which menu option of a word processing program does a star appear?
A star appears under the
menu of the word processing program.
Reset
Next

Answers

Answer:

"a callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question."

Explanation:

The correct answer in the box is as follows:

A star appears under the shapes menu of the word processing program.

What is the word processing program?

The word processing program may be characterized as a type of MS software that is significantly used to create, edit, save, and print documents on a computer. It permits a user to create documents that mimic the format and style of the original document along with diverse functions.

The Shapes menu in the word processing program has numerous shapes like rectangles, Ellipses, and Freehand polygons. There are some other numbers of other shapes such as arrows, speech balloons, various stars, and others are also included in this menu tool.

If a user wants to add any specific shape, he/she is allowed to click Insert, click Shapes, select a shape, and then click and drag to draw the shape. That specific shape is now inserted in the word processing documents.

Therefore, a star appears under the shapes menu of the word processing program.

To learn more about Word processing documents, refer to the link:

https://brainly.com/question/1596648

#SPJ7

Who wants to play nitro type with me. My user is thievesGuildcuu

Answers

Answer:

I can

Explanation:

Answer:

Sure.

My user Name is: Queen Void.

Compute the decimal representation for each of the following numbers.

a. (1100110)2
b. (346)7
c. (1024)8
d. (3B2)16
e. (AF72)16
f. (120121)3
g. (A22)11

Answers

Answer:

[tex](1100110)_2= 102_{10[/tex]

[tex](346)_7= 181_{10[/tex]

[tex](1024)_8 = 532_{10[/tex]

[tex](3B2)_{16} = 946_{10[/tex]

[tex](AF72)_{16}= 44914_{10[/tex]

[tex](120121)_3= 421_{10[/tex]

[tex](A22)_{11} = 1234_{10}[/tex]

Explanation:

Required

Convert to decimal

To do this we get the position of individual digits (starting from the rightmost digit).

Then each digit is multiplied by the base raise to power its position.

Lastly, we sum the results of the products.

Following the above steps, we have:

[tex]a.\ (1100110)_2[/tex]

[tex]= 1 * 2^6 + 1 * 2^5 + 0 * 2^4 + 0 * 2^3 + 1 * 2^2 + 1 * 2^1 + 0 * 2^0[/tex]

[tex]= 1 * 64 + 1 * 32 + 0 * 16 + 0 * 8 + 1 * 4 + 1 * 2 + 0 * 1[/tex]

[tex]= 64 + 32 + 0 + 0 + 4 + 2 + 0[/tex]

[tex]= 102[/tex]

Hence:

[tex](1100110)_2= 102_{10[/tex]

[tex]b.\ (346)_7[/tex]

[tex]= 3 * 7^2 + 4*7^1 + 6 * 7^0[/tex]

[tex]= 3 * 49 + 4*7 + 6 * 1[/tex]

[tex]= 147 + 28 + 6[/tex]

[tex]= 181[/tex]

Hence:

[tex](346)_7= 181_{10[/tex]

[tex]c.\ (1024)_8[/tex]

[tex]= 1 * 8^3 + 0 * 8^2 + 2 * 8^1 + 4 * 8^0[/tex]

[tex]= 1 * 512+ 0 * 64 + 2 * 8 + 4 * 1[/tex]

[tex]= 512+ 0 + 16 + 4[/tex]

[tex]= 532[/tex]

Hence:

[tex](1024)_8 = 532_{10[/tex]

[tex]d.\ (3B2)_{16[/tex]

[tex]= 3 * 16^2 + B * 16^1 + 2 * 16^0[/tex]

[tex]= 3 * 256 + B * 16 + 2 * 1[/tex]

B represents 11, so we have:

[tex]= 3 * 256 + 11 * 16 + 2 * 1[/tex]

[tex]= 768 + 176 + 2[/tex]

[tex]= 946[/tex]

Hence:

[tex](3B2)_{16} = 946_{10[/tex]

[tex]e.\ (AF72)_{16[/tex]

[tex]= A * 16^3 + F * 16^2 + 7 * 16^1 + 2 * 16^0[/tex]

[tex]= A * 4096 + F * 256 + 7 * 16 + 2 * 1[/tex]

A represents 10 and F, 15; So, we have:

[tex]= 10 * 4096 + 15 * 256 + 7 * 16 + 2 * 1[/tex]

[tex]= 40960 + 3840 + 112 + 2[/tex]

[tex]= 44914[/tex]

Hence:

[tex](AF72)_{16}= 44914_{10[/tex]

[tex]f.\ (120121)_3[/tex]

[tex]= 1 * 3^5 + 2*3^4 + 0*3^3 + 1*3^2 + 2*3^1 + 1*3^0[/tex]

[tex]= 1 * 243 + 2*81 + 0*27 + 1*9 + 2*3 + 1*1[/tex]

[tex]= 243 + 162 + 0 + 9 + 6 + 1[/tex]

[tex]= 421[/tex]

Hence:

[tex](120121)_3= 421_{10[/tex]

[tex]g.\ (A22)_{11[/tex]

[tex]= A * 11^2 + 2 * 11^1 + 2 * 11^0[/tex]

[tex]= A * 121 + 2 * 11 + 2 * 1[/tex]

A represents 10, so we have:

[tex]= 10 * 121 + 2 * 11 + 2 * 1[/tex]

[tex]= 1210 + 22+ 2[/tex]

[tex]= 1234[/tex]

Hence:

[tex](A22)_{11} = 1234_{10}[/tex]

The Electronic Age began in the
A. 1940s
B. 1970s
C. 1980s
D. 1990s

Answers

Answer:

1940

Explanation:

B:1940s,
Explanation can I have brainiest

On his website, Mario has a video that visitors must click to play. He wants the video to play automatically when the page loads. What attribute should Mario add to the
A. controls
B. loop
C. autoplay
D. play

Answers

Answer:

C: AutoPlay

Explanation:

it is C because the definition of AutoPlay is: a functionality that causes a video, audio file, etc. to play automatically, without action from a user.

PLEASE ANSWER QUICK
How can improving one’s reasoning skills also improve one’s performance on the job?
A. If one can improve one’s reasoning, one can also improve one’s physical fitness and athletic performance.
B. If one can improve one’s reasoning, one can perform anything.
C. High-performing workers always work reasonable schedules.
D. High-performing workers are able to analyze sophisticated streams of data and solve complex problems.

Answers

Answer: C

Explanation:

C high performance workers always work

Write a program to display the following diamond-shape like pattern based on the height given by the user. Assume that the user will always enter a positive odd number.

Answers

Answer:

try:

   size = int(input("Enter a number: "))

except ValueError:

   print("must be a number")

if size==0:

   print("number must be greater than zero.")

elif size%2==0:

   print("number must be odd.")

   

else:

   obj = '#'

   mid_size = round(size/2)

   s = size - mid_size

   count = 2

   counts = 1

   for i in range(size+1):

       if i<=mid_size:

           print(" " *(size - i) + (obj+" ") * i)

       elif i>mid_size:

           print(" " * (s + counts) + (obj + " ") * (i - count))

           count += 2

           counts += 1

Explanation:

The python source code uses a try and except statement to check for value error and print a diamond shape of the object "#" determined by the input number.

What is something about online conferencing that you understand better now.
What did you learn?

Answers

Answer:

man this question is really about your personal experience but i'll try my best to answer this

Explanation:

onnline Web Conferencing is used by businesses and now schools who went to online because of the virus. for businesses i learned they use it to present and share with online collaboration on different applications including documents, web sites, data files, video, emails, and reduce the time and cost of business travel for meetings. i understand now that online conferencing can be used for Applications for web conferencing include meetings, training events, lectures, or presentations from a web-connected computer to other web-connected computers.

If a priority queue is being implemented using an unordered list, what is the Big-O complexity of the Enqueue operation?

Answers

Answer:

the answer is O(1)

Explanation:

A priority queue is a type of queue whereby each of the elements are linked with a priority and the elements are served according to their priority.

The word enqueue means to add elements to the back of the queue

For this question, while using an unordered list, O(1) is the big-O complexity of the enqueue operation. O(1) is a natural Choice for queues.

Someone help me for about how to avoid online scams please I need help no trolls

Answers

Answer:

1. (for emails) Block spam messages.

2. Look at who sent whatever it is and make sure it is the exact email for the brand.

3. If someone is putting a lot of emojis in a comment or somthing its fake.

4. Make sure to read the fine print.

5. Do not giveaway personal information like zip code, address, social security number.

nder a Huffman encoding ofnsymbols with frequenciesf1, f2, . . . , fn, what is the longest a codewordcould possibly be

Answers

Answer:

The longest codeword that could possibly be for "n" symbol is n-1 bits.

Explanation:

From the given information:

Suppose we are to consider a set of frequencies [tex]\mathtt{f_1,f_2,f_3 ...,f_n}[/tex], for which f is a symbol for the length n. Therefore, the longest codeword that could possibly be for "n" symbol is n-1 bits.

However, during the encoding for "n" in conjunction with n-2, then the possibilities for n are; [tex]\mathtt{\dfrac{1}{2}, \dfrac{1}{4}, ... \dfrac{1}{2^{n-2}}}[/tex]

We can conclude that the longest codeword that could possibly be for "n" symbol is n-1 bits.

The 1950s brought the television and interest in using television as a teaching device. In 1952, the _____________________________ decided to set aside 242 educational channels.

Answers

Answer:

Federal Communications Commission

Explanation:

The 1950s brought the television and interest in using television as a teaching device. In 1952, the Federal Communications Commission decided to set aside 242 educational channels.

The Federal Communication Commission were in charge of determining which type of programs were to be aired based in different factors such as current state of the nation etc.

label parts of camera

Answers

Answer:

Viewfinder.

Pentaprism.  

Focusing Screen.

Condenser Lens.

Digital Sensor.

Shutter. ...

Display. ...

Electronics.

Explanation:

A computer has _____IP address(es).

a) many
b) one

Answers

Answer:

one................

Answer:

B) one

Explanation:

Information technology

Answers

Answer:

Study or use of systems

Explanation:

especially, computers, telecommunications for storing retrieving and sending some informations

Answer:

Information technology is the use of computers to store, retrieve, transmit and manipulate data, or information, often in the context of business or other enterpise.

Which input value causes the loop body to execute a 2nd time, thus outputting "In loop" again? { String s = "Go"; while ((!s.equals("q"))&& (!s.equals("")) System.out.println("In loop"); 5 - scnr.nextO;
a) "Quit"
b) "q" only
c) "Q only
d) Either "q" or "Q"

Answers

Answer:

a) "Quit"  

c) "Q only

Explanation:

Given

String s = "Go";

while ((!s.equals("q"))&& (!s.equals("")))  {

System.out.println("In loop");

s = scnr.next();

}

Required

What input causes another execution

Analyzing the while condition

while ((!s.equals("q"))&& (!s.equals("")))  

This can be split into:

!s.equals("q")) && (!s.equals(""))

Meaning

When s is not equal to "q" and when s is not an empty string

In other words,

the loop will be executed when user input is not "q" and user input is not empty.

So, from the list of given options: The loop both will be executed when:

a) Input is "Quit"

c) Input is Q only

Input of q will terminate the loop, hence b and d are incorrect

To italicize text located within a text box, which grouping would you use? Effects Text Font Typography

Answers

Answer:

Font

Explanation:

It seems like the only real answer from reading the lesson

Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED
(Assume that the length of the text-it is 47 characters long- is known before the search starts).

Answers

Answer:

Total number of character comparison = 43

Explanation:

Using the Brute force algorithm

The string of n characters is known as text, and the string of m characters is known as the pattern.

From the given information:

The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED

The pattern (m) = GANDHI

The total no of characters that we have in the text = 47

The total number of characters in pattern = 6

For a brute force algorithm;

Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1

= 47 – 6 + 1

= 47 – 5

= 42

Thus; the algorithm will attempt the trial 42 times.

Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.

On each attempted trial, the algorithm will make one unsuccessful comparison.

However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.

Hence, we can calculate the total number of character comparison as follows:

Total number of character comparison = [tex]\mathbf{\bigg ( ( 42 - (no. \ of \ failed \ comparison) ) \times 1 + (1 \times ( Two \ successful \ comparisons) ) \bigg ) }[/tex]

Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )

Total number of character comparison = 41 + 2

Total number of character comparison = 43

Acrostics, acronyms, and rhymes are a few examples of __________. A. a visual strategy B. the misinformation effect C. memory reconstruction D. a mnemonic device Please select the best answer from the choices provided A B C D

Answers

Answer:

The answer is D) A mnemonic device

Answer:

D

Explanation:

I hope this helps! Sorry if it is wrong ;-;

True or false: Simultaneous multithreading (SMT) uses threads to improve resource utilization of a dynamically scheduled, out-of-order processor.

Answers

Answer:

True

Explanation:

Simultaneous multithreading or otherwise called, SMT that is a technique that us used for improving the total and overall efficiency of superscalar CPUs with hardware multithreading. Simultaneous Multithreading allows different types of independent threads, ability to execute and then eventually take optimum and much better use of the resources that is provided by modern processor architectures. Multithreading can not only allow multiple threads to be executed simultaneously in a single CPU core, it also allows multiple tasks some of which are different page tables, different I/O permissions, and others to be executed

Using range(1,101), make two list, one containing all even numbers and other containing all odd numbers. How can I do this on Python

Answers

Answer:

even = []

odd = []

for i in range(1,101):

if i % 2 == 0:

even.append(i)

else:

odd.append(i)

Using range(1,101), the list of even and odd number can be done in python as follows;

odd_numbers = []

even_numbers = []

for i in range(1, 101):

  if i%2 == 0:

     even_numbers.append(i)

  else:

     odd_numbers.append(i)

print(even_numbers)

print(odd_numbers)

The variable odd_numbers is initialise with an empty list

The variable even_numbers is initialise with an empty list.

Then we loop through the range 1 to 101 as required.

If the looped numbers is divided by 2 without a remainder then the number is appended to the empty list even_numbers.

Else if it has a remainder, the looped number are appended to the empty list, odd_numbers.

Then we print the even_numbers and odd_numbers.

learn more about python here; https://brainly.com/question/14157737?referrer=searchResults

For the sake of maximizing hardware utilization in a multicore system with a many to many threading model, the relationship of the number of user threads U to the number of kernel threads K to the number of CPU cores P should be:

Answers

Answer:

"U > K > P" would be the appropriate answer.

Explanation:

When performing or executing the software, user threads (U) could easily be accomplished and therefore are typically wide in the amount to provide excellent or excellent performance. Multiple kernel threads could indeed be appointed to every other core as well as try to emulate the algorithm for scheduling.

If you need to download something for a class, first

Answers

Answer:

left click, then click save image

Explanation:

Answer:

first try to do it on kami, then on Google docs, then on doc-hub

Which choices correctly describe an Else
statement? Check all that apply.
a conditional statement that will show
different information if the answer to the If
statement is true
a conditional statement that will show
different information after the If statement
answer is false
a statement that contains the code to be
executed when the If value is false or zero
a conditional statement that runs a piece of
code when all program statements are true

Answers

Answer: B C

Explanation:

Answer:B,C,D

Explanation:

An IEEE 802.1D port goes through four states when transitioning to the forwarding state. What is the correct order?

Answers

Answer:

Blocking, listening, learning and forwarding.

Explanation:

An IEEE 802.1D is the media access control (MAC) Bridges standardized by the IEEE group which includes bridging, Spanning tree and other protocols.

An IEEE 802.1D port goes through four states when transitioning to the forwarding state. The correct order are blocking, listening, learning and forwarding.

Corina has added animations to objects on a particular slide within a presentation. She needs to reorder the animations. How should she achieve this goal?

A. Use the Preview button.
B. Access the Advanced timeline.
C. Use the Animation pane.
D. Delete and recreate the animations in the correct order.

Answers

I think it's B but im not 100% sure sorry if im wrong

Answer: C

Explanation:

Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
Hint: think about how you know where the first word ends - you may assume that the sentence contains more than one word.
Input a code in the following:
/* Lesson 3 Coding Activity Question 4 */
import java.util.Scanner;
public class U2_L3_Activity_Four{
public static void main(String[] args){
/* Write your code here */
}
}

Answers

import java.util.Scanner;

public class U2_L3_Activity_Four {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a sentence.");

       String sent = scan.nextLine();

       int count = 0;

       for (int i = 0; i < sent.length(); i++){

           char c = sent.charAt(i);

           if (c != ' '){

               count++;

       }

           else{

               break;

           }

       

   }

       System.out.println("The first word is " + count +" letters long");

   

   }

}

We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!

Following are the java code to the given question:

import java.util.Scanner;//import package

public class U2_L3_Activity_Four //defining a class U2_L3_Activity_Four

{

  public static void main(String[] args) //defining main method

  {

      String s;//defining String variable

      int x,v=0;//dclaring integer variable x,v

      Scanner obx = new Scanner(System.in);//creating Scanner class Object

      System.out.println("Enter a sentence.");//print message

      s = obx.nextLine();//input string value

      for (x = 0; x < s.length(); x++)//defining loop to count string length

      {

          char c = s.charAt(x);//defining char variable that hold char value

          if (c != ' ')//defining if that check space value

          {

              v++;

          }

      }

      System.out.println("The first word is " + v +" letters long");//print length of first word

  }

}

Output:

Please find the attached file.

Program Explanation:

Import package.Defining a class U2_L3_Activity_Four, inside the class main method is declared.Defining a string variable "s" and an integer variable "x,v=0", and a scanner class object is created that inputs string value.In the next step, a for loop is defined that checks the first word in the string value and prints its length value.

Learn more:

brainly.com/question/16092924

Write function that ask for input from a user. Use this input as input for the countdown function that we wrote using the while loop. If the user types 'end', the program exits, otherwise it keeps going.

Answers

Answer:

Written in Python:

def myfunction():

     userinput = input("User input: ")

     while(userinput != "end"):

           countdown(userinput)

           userinput = input("User input: ")

Explanation:

This line defines the function

def myfunction():

           This line prompts user for user input

           userinput = input("User input: ")

           The following while loop checks if userinput is not "end". It continues execution until user input "end"

           while(userinput != "end"):

                       countdown(userinput) If yes, the input is passed to the countdown function for execution

                       This line prompts user for another user input

                       userinput = input("User input: ")

Please note the above code segment assumes that countdown() function has already been written and defined

Other Questions
D. Fill in the inversion chart below. I need the blanks The football team has a total of 350 jerseys. There are 154 medium-sized jerseys. What percent of the jerseys are medium-sized jerseys?(answer this and show your work please)_answer here_% are medium-sized jerseys.(Type an integer or a decimal.) pleaae help me I WILL MARK YOU AS BRAINLIEST Prepare a speech for the school assembly based on the thoughts given below. Once we have computer outlets in every home, each of them hooked up to enormous libraries, where you can ask any question and be given answers, you can look up something youre interested in knowing, however silly it might seem to someone else. Issac Asimov Men are only as good as their technological development allows them to be. George Orwell. Meiosis occurs inembryo cellsplant cellsreproductive cellsanimal cell What is emphasized in the poem but absent in the painting?a. The challenge of being judged by both cultures.b. The longing to return to one's home.c. The refusal to assimilate to a new culture.d. The difficulty of learning a new language of the students in a school are in sixth grade. a. How many sixth graders are there if the school has 90 students? b. How many sixth graders are there if the school has 27 students? c. If the school has students, write an expression for the number of sixth-graders in terms of. d. How many students are in the school if 42of them are sixth graders? plz help it's my test What is the largest number of electoral votes a state has? What does X equal to What is the facilitated diffusion of water through a selectivelypermeable membrane? A Student notes that a chunk of wood is much lighter after it has been burned. He concludes that burning a substance destroyed some of the mass in that substance. Doi you agree or disagree explain why or why not. Please help answer this question! PLS HELP ME ASAP PLEASE AND TY If someone is good at drawing do you mind make me a storyboard based on any cartoon please make it look asthetic and girly I will be so happy. You can draw it or make it in on any storyboard maker website. I would like out if you made it on Canva.com. I will give you 68 points PLEASE HELP LOL Please help! Ill give brainleist! The small piston of a hydraulic lift has an area of 15 cm. A car weighing 45,000 N is placed on the 2500 cm large piston. How much force is required on the small piston to lift the car? In what conjugations do vowels of irregular verbs change? 1st person singular 2nd and 3rd person singular all plurals all singulars A machine can wrap 900 lollipops in 36 minutes what is the unit rate or lollipops wrapped every minute IM IN A RUSH PLZ HELP ME WILL GIVE BRAINEST!Jenna's family is planning a trip to Oceanside, California. They will begin their trip in Scranton, Pennsylvania and will travel 2,754 miles over 9 days. If the family travels an equal number of miles every day, how far will they travel? Which table represents a proportion relationship?