CHALLENGE ACTIVITY
1.6.1: Type casting: Computing average owls per zoo.
Assign avg_owls with the average owls per zoo. Print avg_owls as an integer.

Sample output for inputs: 1 2 4
Average owls per zoo: 2

-------------------------------------------------------------------
Someone please explain what I am doing wrong?

CHALLENGE ACTIVITY1.6.1: Type Casting: Computing Average Owls Per Zoo.Assign Avg_owls With The Average

Answers

Answer 1

Answer:

avg_owls=0.0

num_owls_zooA = int(input())

num_owls_zooB = int(input())

num_owls_zooC = int(input())

num_zoos = 3

avg_owls = (num_owls_zooA + num_owls_zooB + num_owls_zooC) / num_zoos

print('Average owls per zoo:', int(avg_owls))

Explanation:

There is a problem while you are trying the calculate the average owls per zoo.

As you may know, in order to calculate the average, you need to get the total number of owls in all the zoos, then divide it to the number of zoos. That is why you need to sum num_owls_zooA + num_owls_zooB + num_owls_zooC and divide the result by num_zoos

Be aware that the average is printed as integer value. That is why you need to cast the avg_owls to an int as int(avg_owls)


Related Questions

Evaluate 3³×2³×4²×3-¹×4-²​

Answers

Answer: I already answered this question here:

Answer:

72:)

Explanation:

Hope it helps;))))))))


What is Microsoft Excel? Why is it so popular​

Answers

Answer:

Its a spreadsheet devolpment by Microsoft.

Explanation:

1. It is a technique of creating a picture or pattern by forcing ink or metal on to a surface though a screen of fine material.​

Answers

Answer:

hmm

Explanation:

I'm pretty sure it's screen painting? it's a print making method that forces ink through fine mesh

Code a complete Java program to load and process a 1-dimensional array.

Create clear comments as you code to tell me what you are doing.
Import the Java libraries that you will need.
Create a single dimensional array that will hold 15 wages.
In the main, load an array with all of the records from a .txt file named Salary txt. The file has 15 records in it.
Sort the array in ascending order.
Write a method named increaseWages(). This method will add $500 to each of the 15 wages. In other words, you are giving each person a raise of $500.
Pass the array to the method from the main().
Increase the wage amounts in the array (as described above), in the method. In other words, in the end the array should hold the NEW, higher wages.
Output each new wage (use the console for this)
Calculate a total of the new wages in the method
Output the total of the new wages in the method (use a dialog box for this)
Return the array with the new wages to the main().
There is NO user interaction in this program.

Answers

Answer:

Here you go.Consider giving brainliest if it helped.

Explanation:

import java.io.*;//include this header for the file operation

import java.util.*;//to perform java utilities

import javax.swing.JOptionPane;//needed fro dialog box

class Driver{

  public static void main(String args[]){

      int wages[]=new int[15];//array to hold the wages

      int index=0;

      try{

          //use try catch for the file operation

          File file=new File("wages.txt");

          Scanner sc=new Scanner(file);//pass the file object to the scanner to ready values

          while(sc.hasNext()){

              String data=sc.nextLine();//reads a wage as a string

              String w=data.substring(1);//remove the dollar from the string data

              wages[index++]=Integer.parseInt(w);//convert the wage to int and store it in the array

          }

          sc.close();//close the scanner

      }catch(FileNotFoundException e){

          System.out.println("Error Occurrred While Reading File");

      }

     

      //sort the array using in built sort function

      Arrays.sort(wages);

      //print the wages

      System.out.println("Wages of 15 person in ascending order:");

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

          System.out.print("$"+wages[i]+" ");

      }

      //call the increases wages method

      wages=increaseWages(wages);//this method return the updated wages array

     

  }

 

  //since we can call only static methods from main hence increaseWages is also static

  public static int[] increaseWages(int wages[]){

      //increase the wages

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

          wages[i]+=500;

      }

     

      //print the new wages

      int sum=0;

      System.out.println("\n\nNew wages of 15 person in ascending order:");

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

          sum+=wages[i];//sums up the new wages

          System.out.print("$"+wages[i]+" ");

      }

     

      //display the summation of the new wages in a dialog box

      JOptionPane.showMessageDialog(null,"Total of new wages: "+sum);

      return wages;

  }

}

What is a principle of DevOps?​

Answers

Answer:

the main principles of DevOps are automation, continuous delivery, and fast reaction to feedback. You can find a more detailed explanation of DevOps pillars in the CAMS acronym: Culture represented by human communication, technical processes, and tools.

Commands from the Quick Access toolbar can be used by
Clicking on the command
Navigating to Backstage view
Selecting the appropriate options on the status bar
Selecting the function key and clicking the command​

Answers

Answer:

Clicking on the command.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

A portion of the Outlook interface that contains commonly accessed commands that a user will require frequently and is able to be customized by the user based on their particular needs is referred to as the Quick Access toolbar.

Commands from the Quick Access toolbar can be used by clicking on the command.

16. The Nintendo Entertainment System (NES) saw its sales skyrocket as a result of the launch of which of the following games?
a) Pac-Man
b) Super Mario Bros
c) The Legend of Zelda
d) Popeye

Answers

Answer:

Super Mario bros

Explanation:

Write a function process_spec that takes a dictionary (cmap), a list (spec) and a Boolean variable (Button A) as arguments and returns False: if the spec has a color that is not defined in the cmap or if Button A was pressed to stop the animation Otherwise return True

Answers

Answer:

Explanation:

The following code is written in Python. The function takes in the three arguments and first goes through an if statement to check if Button A was pressed, if it was it returns False otherwise passes. Then it creates a for loop to cycle through the list spec and checks to see if each value is in the dictionary cmap. If any value is not in the dictionary then it returns False, otherwise, it returns True for the entire function.

def process_spec(cmap, spec, buttonA):

   if buttonA == True:

       return False

   

   for color in spec:

       if color not in cmap:

           return False

   return True

When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that the products/services you offer will meet their needs is a vital skill to have. When you show customers that you truly hear their needs, what sales skill are you practicing?
active listening
product knowledge
communication
confidence

Answers

Answer:

Communication

Explanation:

The ability to communicate clearly when working with customers is a key skill because miscommunications can result in disappointment and frustration. The best customer service professionals know how to keep their communications with customers simple and leave nothing to doubt.

Suppose the program counter is currently equal to 1700 and instr represents the instruction memory. What will be the access of the next instruction if:

instr[PC] = add $t0, $t1, $t2

Answers

Answer:

C

Explanation:

omputer chip

sorry btw

a user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless network. You personally checked to verify that the wireless worked properly before the user left your office. the user states she rebooted the computer several times but the problems still persists. Which of the following is the first step you should take to assist the user in resolving this issue?

Answers

1. Make sure most recent update has been installed.
2. Run Windows Network Trouble shooter to ensure proper drivers are up to date and existing.
3. Carefully Review Windows Event Log for more detailed troubleshooting.
4.Last resort install a fresh boot on the laptop.

3. In which of the following places can
you always find a 'home page'?
a) at home
b) in a book
c) on the World Wide Web
d) in a printer​

Answers

Answer:

On the World Wide Web

Explanation:

Sure theres always a homepage somewhere. But i dont know what your researching so i went with c.

On the World Wide Web

List all the steps used to search for 25 in the sequence given below. Use both (a) linear search and (b) binary search. 2, 7, 13, 18, 21, 24

Answers

Answer:

13217182472

Explanation:

liner search and binary search

12. What separated Grand turismo from other racing games was its focus on ______.
a) Your audiences and females in particular
b) Fantasy graphics and visuals
c) Pure simulation and ultrarealistic features
d) All of the above

Answers

Answer:

c) Pure simulation and ultrarealistic features

Explanation:

The main difference between Grand Turismo and other racing games was its focus on Pure simulation and ultrarealistic features. The Grand Turismo series has always been a racing simulation, which was made in order to give players the most realistic racing experience possible. This included hyperrealistic graphics, force feedback, realistic car mechanics, realistic weather, and wheel traction among other features. All of this while other racing games were focusing on the thrill of street racing and modifying cars. Therefore, it managed to set itself apart.

In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.

a. lw $t5, 0($t0)
b. lw $t4, 4($t0)
c. add $t3, $t5, $t4
d. sw $t3, 12($t0)
e. lw $t2, 8($t0)
f. add $t1, $t5, $t2
g. sw $t1, 16($t0)

Answers

Answer:

b. lw $t4, 4($t0)

c. add $t3, $t5, $t4

Explanation:

Pipeline hazard prevents other instruction from execution while one instruction is already in process. There is pipeline bubbles through which there is break in the structural hazard which preclude data. It helps to stop fetching any new instruction during clock cycle.

10.The front end side in cloud computing is​

Answers

Answer:

The front end is the side the computer user, or client, sees. The back end is the "cloud" section of the system.

The front end includes the client's computer (or computer network) and the application required to access the cloud computing system.

Explanation:

can i have brainliest please

How to connect on phpmyadmin?plss

Answers

Open your browser and go to localhost/PHPMyAdmin or click “Admin” in XAMPP UI. Now click Edit privileges and go to Change Admin password, type your password there and save it. Remember this password as it will be used to connect to your Database.

hope this helps!

Write a method that converts a time given in seconds to hours, minutes and seconds using the following header:

public static String convertTime(int totalSeconds)

The method returns a string that represents the time as hours:minutes:seconds.

Write a test program that asks the user for the time in seconds and then display the time in the above format.

Answers

Answer:

hope this helps.

Explanation:

import java.util.*;

class Timeconvert{ //class nane

public static String convertTime(int totalSeconds) /* fn to convert seconds to hh:mm:ss format */

{

int sec = totalSeconds; // a copy of totalSeconds is stored in sec

int m=sec/60; //to find the total min which obtained by doing sec/60

int psec=sec%60; //psec store remaining seconds

int hrs=m/60; //stores hr value obtained by doing m/60

int min=m%60; //stores min value obtained by m%60

return (hrs + ":" + min+ ":" +psec);// returning that string

}

}

public class Main

{

  public static void main(String[] args) {

  Timeconvert t = new Timeconvert();

  Scanner in = new Scanner(System.in); //Scanner class

System.out.println("Enter the number of seconds:");

int sec = in.nextInt(); //to input number of seconds

System.out.println("hours:minutes:seconds is " + t.convertTime(sec)); //result

 

  }

}

13. By adding built-in writable memory to its cartridge, Nintendo’s _________________ was the first console game that gamers could save.
a) Mario Bros.
b) Donkey Kong
c) The Legend of Zelda
d) Zork

Answers


The answer is c
Explanation:

Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical memory of 32 frames. Show your work. You can either type the solution or write

Answers

Answer:

Logical address = 16 bits

Physical address = 15 bits

Explanation:

Logical space, number of pages = 64 = 2^6

Word size per page = 1024 = 2^10

Size of logical address :

Number of pages * words per page

2^6 * 2^10 = 2^(6+10) = 2^16 = 16 bits

For the physical address :

Number of frames = 32 = 2^5 frames

Word size = 1024 = 2^10

Number of frames * word size

2^5 * 2^10 = 2^(10+5) = 15 bits

The Freeze Panes feature would be most helpful for which situation?
A.when the functions used in a worksheet are not working correctly
B.when a large worksheet is difficult to interpret because the headings disappear during scrolling
C.when the data in a worksheet keeps changing, but it needs to be locked so it is not changeable
D.when a large worksheet is printing on too many pages

Answers

Answer:

i think a but not so sure

Explanation:

Answer: Option B is the correct answer :)

Explanation:

What should be the first tag in any HTML document? A. <head> B. <title> C. <html> D. <!DOCTYPE >​

Answers

Answer:

C.

Explanation:

Java Programming
Create a USMoney class with two private integer instance variables named dollars and cents. Add a constructor with two parameters for initializing a USMoney object. The constructor should check that the cents value is between 0 and 99 and, if not, transfer some of the cents to the dollars variable to make it between 0 and 99.
Add a plus() method to the class that takes a USMoney object as its parameter. It creates and returns a new USMoney object representing the sum of the object whose plus() method is being invoked and the parameter. Hint: Your USMoney object may require both a getDollars() method and a getCents() method.
The plus() method does not modify the values of the two existing objects. It should also ensure that the value of the cents instance variable of the new object is between 0 and 99.
For example, if x is a USMoney object with 5 dollars and 80 cents, and if y is a USMoney object with 1 dollar and 90 cents, then x.plus(y) will return a new USMoney object with 7 dollars and 70 cents.
Of course, you will need to create a USMoneyDemo class that tests the USMoney class. Your USMoneyDemo should prompt the user twice. The first to enter an integer representing dollars and the second to enter an integer representing cents. Use these values to create the first object named x. Do it again for the object named y. Do not worry about putting these prompts in a loop for now.
Be sure to add some documentation and put any partner(s) names in the main application's doc box.
For Part 1, submit two files on Blackboard: USMoney.java and USMoneyDemo.java
Part 2 – 25 points
Create a Date class with three private integer instance variables named day, month, year. It has a constructor with three parameters for initializing the instance variables, and it has a method named daysSinceJan1(). Note: It could have other methods.
Just as its identifier suggests, the daysSinceJan1() method computes and returns the number of days since January 1 of the same year, including January 1 and the day in the Date object itself.
Create a DateDemo class that tests the Date class. First prompt the user to enter an integer representing the day, a second prompt to enter an integer representing the month and a third to enter an integer representing the year. (Do not worry about doing any validation of the values entered.) Then, instantiate your Date object with these values. After that, call the method DaysSinceJan1() to display the answer.
An example would be that the user enters values of day = 1, month = 3, and year = 2019, then the call day.daysSinceJan1() should return 60 since there are 60 days between the dates of January 1, 2019, and March 1, 2019. In leap years, it should return 61.
Note that, in a leap year like 2020 will be, there will be one more day counted between January 1 and any date following February 28. What are the rules for leap years? If the year is evenly divisible by four, then it is a leap year...but not always! If it is a century year such as 1900 or 2000, it is only a leap year if evenly divisible by 400. Therefore, the century year 2000 WAS a leap year but 1900 was NOT a leap year! Neither were 1700 or 1800 and neither will be 2100...but 1600 was!
You may NOT use an Array or ArrayList (or any other type of array) and you may not use any of the Java API date classes and/or methods.
Document like you did for Part 1.
For Part 2, submit two files on Blackboard: Date.java and DateDemo.java

Answers

Answer:

Explanation:

The following codes are written in Java. Both the class and the classDemo are in the same file but seperated as classes should be for each part of the question. The example outputs are shown in the attached pictures below, and the codes are added as txt files due to technical difficulties.

Frank enters "1" in the field for postal code. What is frank most likely trying to do?

Answers

Answer:

Explanation:

Identify the management, organization, and technology factors responsible for slow adoption rates of internal corporate social networks.when a company decides to launch a social networking program the management, all need to be on board with the launch. from the ceo down to the shift or assistant manager everyone needs to know its coming and be excited. the organization of such a launch needs to be mapped out, and training provided for the new systems. within the company, they need to make sure the technology at hand (computers, tablets, and company phones), are all compatible with the system. when a company launches a new system, and the find that the employees are not adopting it, they need to investigate the reasons. is the management at all level's onboard? did we organize the launch properly? do we have the right technology for the system? things can goeither way but if

Sergio needs to tell his team about some negative feedback from a client. The team has been
working hard on this project, so the feedback may upset them. Which of the following explains
the best way for Sergio to communicate this information?

A) Hold an in person meeting so that he can gauge the team's body language to assess their
reaction

B) Send a memorandum so everyone will have the feedback in writing

C) Hold a video conference so everyone can see and hear about the client's concern without the group witnessing each other's reactions

D) Send an email so everyone will have time to think about the feedback before the next team meeting

Answers

Answer: A

Explanation: sergio should do it in person that way he can assess their body language. by doing this, he can tell how the team feels about the feedback

From your finding,conclusion and recommendations can you make on the issue of human rights violations to:Government​

Answers

Answer:
Different recommendations and conclusion can be drawn on human rights violation in government and communities.
Explanation:
1-Foremost thing that government can do is the legislation to control the human rights violation and this law should be applicable on all the people belong to any community. Government also make human rights violation issue a part of their policy so that every government could understand before hand.
2-Communities should run campaign so that people understand their human rights and can complain against such violations.
Human right violations happens all over the world but individuals and government need to work together to stop and eradicate such violations

In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where indicated:_____.
mov al, 00001111b
test al, 00000010b
mov al, 00000110b
cmp al, 00000101b
(Hint: type in your answer as CF = ZF = SF = ___)

Answers

Answer:

CF  = 0

ZF = 0

SF = 0

Explanation:

Assuming that at the initial stage that all Flag values are = zero

every Instruction sequence will have the values of CF , ZF and SF = 0 respectively

i.e.

CF = 0

ZF = 0

SF = 0

This is because the instruction "mov" in the instruction sequence does not have an effect on the flags. until when the accumulator is loaded with the value zero

Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?

This was a really hard part to write, but it finally works.

I’m not sure what this does, but I don’t have time to troubleshoot it.

This segment returns a value that is used by the segment marked B.

Answers

Answer:

This segment returns a value that is used by the segment marked B.

Explanation:

just took assigment

Answer:

C

Explanation:

6. Which of the following games will most likely appeal to a casual player?
a) Wii Sport
b) Contra
c) Farmville
d) Both A and C

Answers

Answer:

A

Explanation:

Wii sports is a good game for a casual player. :)

What best determines whether a borrower's interest rate on an adjustable rato loan goes up or down?
a fixed interest rate
a bank's finances
a market's condition
a persons finances

Answers

It should be noted that term that best determines whether a borrower's interest rate on an adjustable ratio loan goes up or down is market's condition.

This is because, Market conditions helps to know the state of an industry or economy, and this will helps to get the necessary information about borrower's interest rate on an adjustable ratio loan.

Therefore, option C is correct.

Learn more about Market conditions at:

https://brainly.com/question/11936819

Answer:c

Explanation:

Other Questions
PLEASE HELP ME!!!!!!!! 14,, plz help plz plz plz 20 points The volume of a rectangular prism is 945 ft. If it has a length of 15 ft and a width of 9 ft, what isits height? Did I bleed through my pants In the triangle ABCare drawn two sidesof it, BB1 and AA1.Those half-edgesintersect at point O.What is the length ofthe semicircular BB1if B10 = a cm? Solve for brainliest!-x +9y = -5x- 5y =1 To use the elements/principles of design to reflect on a piece of art is the __________ step. A. describe B. analyze C. interpret D. evaluate argumentative about why foot ball players should be paid less One angle of an isosceles triangle measures 30. Which other angles could be in that isosceles triangle The total fees for the high school play are$250. Tickets to the play cost S5 forstudents and S8 for nonstudents. Write alinear inequality that describes the numberof student and nonstudent tickets that nccdto be sold for the drama class to be able topay the fees. 24 days until I'll be going to High School check Characterize EACH of the three given statements as being TRUE or FALSE and then indicate the collective true-false status of the statements using the choices. (1) Electron loss is always associated with an increase in oxidation number. (2) An exothermic reaction occurs when the energy required to break bonds in reactants is less than the energy released by bond formation in the products. (3) The concentrations of pure liquids and pure solids are never included in an equilibrium constant expression because such concentrations never change. Write the equation of the line in fully simplified slope-intercept formPLEASE HELP MEE Considere un elemento "X" que posee como valencias 2, 4 y 6. En su nomenclatura tradicional, considerando la valencia cuatro, ese compuesto debera considerar la terminacin: Which sequence is an example of an arithmetic sequence?Question 9 options:5, 10, 20, 40, 80, 5, 10, 15, 20, 25, 3, 6, 18, 54, 20, 10, 5, 2.5, The probabilty that a student owns a car is 0.65 the porbability that a student owns a compuer is 0.82 the probability that a student owns both is 0.55what is the probability that a student owns both and what is the probability that a student owns none Ten students each attempted 10 free throws. The list shows how many free throws each student made. What is the mean of free throws made? * To which rational number subset(s) do the following numbers belong?1, 4, 7, 11, 14A. whole numbers and integers onlyB. whole numbers and natural numbers onlyC. natural numbers and integers onlyD. natural numbers, whole numbers, and integers Influences the loudness of a sound The belief that a person is able to choose to receive salvation or to reject it is called _____. aPredestination bFree Will cCalvinism dLutheranism