Create a function average_temp(s) that accepts a file name s that contains temperature readings. Each line in the file contains a date followed by 24 hourly temperature readings in a comma-separated-value format, like this example:

2/3/2016,18,17,17,18,20,22,25,30,32,32,32,33,31,28,26,26,25,22,20,20,19,18,18,18

For each line in the file, the function should print out a line containing two items: the date, then comma, then the average temperature on that date, e.g.

3/5/2018, 58.24

3/6/2018, 60.11

3/7/2018, 57.55

Answers

Answer 1

Answer:

def average_temp(s): f = open("s.txt","r") for line in f: myList = line.split(",") print(myList[0],end=",") t=0 for i in range(1,25,1): t += int(myList[i]) t /= 24 print(t) f.close()

def average_temp(s):

f = open("s.txt","r")

for line in f:

myList = line.split(",")

print(myList[0],end=",")

t=0

for i in range(1,25,1):

t += int(myList[i])

t /= 24

print(t)

f.close()

Explanation:

I used Python for the solution.


Related Questions

Write a class named Employee that has the following fields: • name: The name field is a String object that holds the employee's name. • idNumber: The idNumber is an int variable that holds the employee's ID number. • department: The department field is a String object that holds the name of the department where the employee works. • position: the position field is a string object that holds the employee's job title.

Answers

Answer:

See attachment please

A computer company has $3840000 in research and development costs. Before accounting for these costs, the net income of the company is $2580000. What is the amount of net income or loss before taxes after these research and development costs are accounted for?

Answers

Answer:

The answer is "loss of 1,260,000"

Explanation:

Following are the important points of the question:

The cost of research and development is = $3840000

net income of the company is=  $2580000

Find: loss or profit .

According to the rate of the cost, the company cost is higher than the company rate. So, the company goes in loss stage, then  

Loss = total cost - net income

Loss = $3840000 - $2580000

Loss= $ 1,260,000

The computer company would face a net loss of $1,260,000.

The question is asking about the calculation of net income or loss for a computer company after accounting for research and development costs. To determine the net income or loss, we subtract the research and development (R&D) costs from the company's income before these costs are accounted for.

So, if the net income before R&D costs is $2,580,000 and the R&D costs are $3,840,000, we perform the following calculation:

Net Income after R&D = Net Income before R&D - R&D costs

Net Income after R&D = $2,580,000 - $3,840,000

Net Income after R&D = -$1,260,000

This result is a net loss of $1,260,000 after accounting for R&D costs.

can someone please help i have no idea what’s going on in this code

Answers

Explanation:

The first 3 lines of code tell the user to input a 5 digit number (ex. 72,910) or a 1 digit number (ex. 3). The next 5 lines of code determine if it is a 5/1 digit number or not. If it is, it prints "Success!". The rest of the code just tells that if it's not a 5/1 digit number, and if it's not, it gives errors and tells the user to try again.

Hope this helps!

Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N : Lather and rinse." num_cycles times, where N is the cycle number, followed by "Done.". Sample output with input: 2 1 : Lather and rinse. 2 : Lather and rinse. Done. Hint: Define and use a loop variable.

Answers

Answer:

def print_shampoo_instructions(num_cycles):

   if num_cycles < 1:

       print("Too few.")

   elif num_cycles >4:

       print("Too many.")

   else:

       N = 1

       for N in range (N,num_cycles+1):

           print(N,": Lather and rinse.")

       print("Done.")

Explanation:

Final answer:

The function shampoo_instructions() controls repetitions based on input, preventing infinite loops, akin to the shampoo instructions' issue. It emphasizes the importance of iteration control in programming loops to avoid endless execution. Understanding how to manage loop cycles prevents program malfunction due to infinite loops.

Explanation:

shampoo_instructions() is a function that takes a parameter num_cycles and prints instructions based on the input. If num_cycles is less than 1, it prints 'Too few.'; if more than 4, it prints 'Too many.'; otherwise, it prints the cycle number followed by 'Lather and rinse.' num_cycles times.The directions on shampoo create an infinite loop since they lack an iteration variable to specify the number of repetitions. In programming, developers must include a mechanism to control loops' execution, preventing infinite iterations.

In a loop, each iteration represents a cycle, akin to the instructions in shampoo; therefore, the concept of controlling the number of repetitions is fundamental to avoid infinite loops and ensure proper program execution.

Your friends’ preschool-age daughter Madison has recently learned to spell some simple words. To help encourage this, her parents got her a colorful set of refrigerator magnets featuring the letters of the alphabet (some number of copies of the letter A, some number of copies of the letter B, and so on), and the last time you saw her the two of you spent a while arranging the magnets to spell out words that she knows. Somehow with you and Madison, things always end up getting more elaborate than originally planned, and soon the two of you were trying to spell out words so as to use up all the magnets in the full set – that is, picking words that she knows how to spell, so that once they were all spelled out, each magnet was participating in the spelling of exactly one of the words. (Multiple copies of words are okay here; so for example, if the set of refrigerator magnets includes two copies of each of ‘C,’ ‘A,’ and ‘T,’ it would be okay to spell out "CAT" twice.) This turned out to be pretty difficult, and it was only later that you realized a plausible reason for this. Suppose we consider a general version of the problem of Using Up All the Refrigerator Magnets, where we replace the English alphabet by an arbitrary collection of symbols, and we model Madison’s vocabulary as an arbitrary set of strings over this collection of symbols.

Answers

Answer:

See explaination

Explanation:

Given a set U which is the set of magnets where each magnet representing a symbol, but are accepted more copies of the same symbol which we number arbitrarily 1,2,3,. ... For example if we had two copies of the symbol A, we would have elements A 1 ,A 2 ) and subsets S 1 ,...S n which represent words formed from the magnets that Madison knows how to spell. Note that if ‘’CAT” was a word in Madison’s vocabulary, then both of the sets C,A 1 ,T and C,A 2 ,T would appear among the S i . We are interested in the maximum number of disjoint sets (which correspond to words in Madison’s vocabulary that can be simultaneously spelled out by the magnet pieces).

We reduce Independent Set (IS) to Set Packing. Given an instance of IS ( G,k ), we set U to be the set of edges of G . For each vertex v i , we introduce a set S i = { e : e = ( v i ,x ) } which has one element for each edge incident to v i . We claim that G has an independent set of size k iff there are k disjoint sets among the S i . Indeed, if I is an independent set of size k then the k sets S v for v ∈ I have no common elements. Also, if { S i 1 ,...,S i k } are k disjoint sets then the vertices v i 1 ,...,v i k have no edges between them thus they form an independent set of size.

Priscilla is providing the junior analysts in her firm with some real-world illustrations to explain some of the recommendations that they must be prepared to make to clients, based on what they have studied in their coursework, in order to solidify their understanding. Which is a reason Priscilla will share with the new analysts for recommending that a client purchase a software package?

Answers

Options:

a) The client wants to develop internal resources and capabilities

b) The client is looking for the lowest possible costs

c) The client has unique business requirement that must be satisfied by this software application

d) The client has some existing technology in place whose requirements must be met by the new software

Answer:

d) The client has some existing technology in place whose requirements must be met by the new software

Explanation:

For a client to purchase a software, the client has an already existing technology that requires that software for adequate functioning. The analyst will recommend the new software to the client based on the technology he/she previously has and the requirements he wants to meet.

The other options are not impossible, but they are not the primary reason why the software will be purchased, the overall aim for all the company's activities may be to develop internal resources and capabilities or to meet some unique business requirements, but these are secondary. The primary purpose is that the client has a technology that cannot function properly without the recommended software.

Homework assignment number 13 Binary search trees have their best performance when they are balanced, which means that at each noden, the size of the left subtree of n is within one of the size of the right subtree of n. Write a program thatwill take an array of generic values that are in sorted order in the array, create a binary search tree, and put the values in the array into the tree. Your binary search tree should be complete ("complete" as defined in chapter 24). Or put another way, it should have the fewest number of levels and still be "complete".Use the following array: "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M","N".Remember, your code is to handle generic data types, not just strings. So while I want you to use the specified array of strings, your program should work if I choose to use an array of Integers, or Characters. Printout the values from the tree (not the array) in a tree fashion so that I can readily see the tree structure, something like this:HD LBFJN A C EGIK M-Name the file that contains the main method TreeDriver.ja

Answers

Answer:

See explaination for the program code

Explanation:

Code below:

package trees;

import java.util.NoSuchElementException;

public class TreeDriver<T extends Comparable<? super T>> {

private Entry<T> root;

publicTreeDriver() {

root = null;

}

public static<T extends Comparable<? super T>>TreeDriver<T> createTestTree() {

return newTreeDriver<T>();

}

public void insert(T value) {

root = insert(value, root);

}

public void remove(T value) {

root = remove(value, root);

}

public boolean contains(T value) {

return valueOf(find(value, root)) != null;

}

private T valueOf(Entry<T> entry) {

return entry == null ? null : entry.element;

}

private Entry<T> insert(T value, Entry<T> entry) {

if (entry == null)

entry = new Entry<T>(value);

else if (value.compareTo(entry.element) < 0)

entry.left = insert(value, entry.left);

else if (value.compareTo(entry.element) > 0)

entry.right = insert(value, entry.right);

else

throw new RuntimeException("Duplicate Entry : " + value.toString());

return entry;

}

private Entry<T> remove(T value, Entry<T> entry) {

if (entry == null)

throw new NoSuchElementException("Entry not found : " + value.toString());

if (value.compareTo(entry.element) < 0)

entry.left = remove(value, entry.left);

else if (value.compareTo(entry.element) > 0)

entry.right = remove(value, entry.right);

else {

// Entry found.

if (entry.left != null && entry.right != null) {

// Replace with in-order successor (the left-most child of the right subtree)

entry.element = findMin(entry.right).element;

entry.right = removeInorderSuccessor(entry.right);

// Replace with in-order predecessor (the right-most child of the left subtree)

// entry.element = findMax(entry.left).element;

// entry.left = removeInorderPredecessor(entry.left);

} else

entry = (entry.left != null) ? entry.left : entry.right;

}

return entry;

}

private Entry<T> removeInorderSuccessor(Entry<T> entry) {

if (entry == null)

throw new NoSuchElementException();

else if (entry.left != null) {

entry.left = removeInorderSuccessor(entry.left);

return entry;

} else

return entry.right;

}

private Entry<T> removeInorderPredecessor(Entry<T> entry) {

if (entry == null)

throw new NoSuchElementException();

else if (entry.right != null) {

entry.right = removeInorderPredecessor(entry.right);

return entry;

} else

return entry.left;

}

private Entry<T> findMin(Entry<T> entry) {

if (entry != null)

while (entry.left != null)

entry = entry.left;

return entry;

}

private Entry<T> findMax(Entry<T> entry) {

if (entry != null)

while (entry.right != null)

entry = entry.right;

return entry;

}

private Entry<T> find(T value, Entry<T> entry) {

while (entry != null) {

if (value.compareTo(entry.element) < 0)

entry = entry.left;

else if (value.compareTo(entry.element) > 0)

entry = entry.right;

else

return entry;

}

return null;

}

private void printInOrder(Entry<T> entry) {

if (entry != null) {

printInOrder(entry.left);

System.out.println(entry.element);

printInOrder(entry.right);

}

}

public void printInOrder() {

printInOrder(root);

}

private static class Entry<T extends Comparable<? super T>> {

T element;

Entry<T> left;

Entry<T> right;

Entry(T theElement) {

element = theElement;

left = right = null;

}

}

private static class Test implements Comparable<Test> {

private String value;

public Test(String value) {

this.value = value;

}

public String toString() {

return value;

}

atOverride // Replace the at with at symbol

public int compareTo(Test o) {

return this.value.compareTo(o.toString());

}

}

private static class Test1 extends Test {

public Test1(String value) {

super(value);

}

}

public static vo id main(String[] args) {

TreeDriver<Test> tree =TreeDriver.createTestTree();

int size = 20;

for (int i = 0; i <= size; i++) {

tree.insert(new Test1(String.valueOf(i)));

}

tree.insert(new Test1("100"));

tree.remove(new Test1("10"));

tree.remove(new Test1(String.valueOf(15)));

tree.remove(new Test1(String.valueOf(20)));

tree.printInOrder();

System.out.println("Contains (10) : " + tree.contains(new Test1("10")));

System.out.println("Contains (11) : " + tree.contains(new Test1(String.valueOf(11))));

}

}

Final answer:

To create a balanced binary search tree from a sorted array, you can use a recursive approach. Here is an example Java code that can be used as a starting point. The code creates a balanced binary search tree by selecting the middle element as the current node and calling the createBalancedBST method on the left and right subarrays.

Explanation:

In order to create a balanced binary search tree from a sorted array, you can use a recursive approach. Here is an example Java code that can be used as a starting point:

import java.util.ArrayList;

class Node<T> {
   Node<T> left;
   Node<T> right;
   T value;

   Node(T value) {
       this.value = value;
       this.left = null;
       this.right = null;
   }
}

public class TreeDriver<T extends Comparable<T>> {
   Node<T> root;

   TreeDriver() {
       this.root = null;
   }
   
   private Node<T> createBalancedBST(T[] arr, int start, int end) {
       if (start > end)
           return null;
       
       int mid = (start + end) / 2;
       Node<T> node = new Node<>(arr[mid]);
       
       node.left = createBalancedBST(arr, start, mid - 1);
       node.right = createBalancedBST(arr, mid + 1, end);
       
       return node;
   }
   
   private void inOrderTraversal(Node<T> node) {
       if (node == null)
           return;
       
       inOrderTraversal(node.left);
       System.out.print(node.value + " ");
       inOrderTraversal(node.right);
   }
   
   public void createAndPrintBalancedBST(T[] arr) {
       this.root = createBalancedBST(arr, 0, arr.length - 1);
       inOrderTraversal(this.root);
   }
   
   public static void main(String[] args) {
       TreeDriver<String> tree = new TreeDriver<>();
       String[] arr = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M","N"};
       tree.createAndPrintBalancedBST(arr);
   }
}


The createBalancedBST method takes an array arr, a start index, and an end index. It recursively creates a balanced binary search tree by selecting the middle element as the current node and calling the createBalancedBST method on the left and right subarrays.

The inOrderTraversal method is used to print the values of the created BST in order.

The partners of a small architectural firm are constantly busy with evolving client requirements. To meet the needs of their clients, the architects must visit several job sites per day. To share and send sensitive project/client information back to the office or with clients, the employees dial into the IPSec-based VPN remotely. For classified proprietary information, two separate extranets were set up with partners in the engineering firm on a server housed inside the office.

What firewall setup would provide the firm both flexibility and security? Justify your response.

Answers

Answer:

Check the explanation

Explanation:

IPSec-based VPN is configured in two different modes namely

IPSec Tunnel mode and IPSec Transport mode so here we are using IPsec transport mode which is used for end to end communications between a client and a server in this original IP header is remain intact except the IP protocol field is changed and the original protocol field value is saved in the IPSec trailer to be restored when the packet is decrypted on the other side due to this arrangement you need to use application based firewall because there are certain specific rules that can address the particular field (explained above-change in IP protocol field) which at the other end need to be same so at the type of decryption, original IP protocol field can be matched.

Consider the following two code segments, which are both intended to determine the longest of the three strings "pea", "pear", and "pearl" that occur in String str. For example, if str has the value "the pear in the bowl", the code segments should both print "pear" and if str has the value "the pea and the pearl", the code segments should both print "pearl". Assume that str contains at least one instance of "pea".

I.

if (str.indexOf("pea") >= 0)

{

System.out.println("pea");

}

else if (str.indexOf("pear") >= 0)

{

System.out.println("pear");

}

else if (str.indexOf("pearl") >= 0)

{

System.out.println("pearl");

}

II.

if (str.indexOf("pearl") >= 0)

{

System.out.println("pearl");

}

else if (str.indexOf("pear") >= 0)

{

System.out.println("pear");

}

else if (str.indexOf("pea") >= 0)

{

System.out.println("pea");

}

Which of the following best describes the output produced by code segment I and code segment II?

Both code segment I and code segment II produce correct output for all values of str.

Neither code segment I nor code segment II produce correct output for all values of str.

Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pear" but not "pearl".

Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pearl".

Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".

Answers

Answer:

Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".

Explanation:

The main issue with the first code segment is the way how the if else if condition are arranged. The "pea" is checked at the earliest time in the first code segment and therefore so long as there is the "pea" exist in the string (regardless there is pear or pearl exist in the string as well), the if condition will become true and display "pea" to terminal. This is the reason why the code segment 1 only work for the values of str that contain "pea".

Write a function so that the main program below can be replaced by the simpler code that calls function mph_and_minutes_to_miles(). Original main program: miles_per_hour = float(input()) minutes_traveled = float(input()) hours_traveled = minutes_traveled / 60.0 miles_traveled = hours_traveled * miles_per_hour print('Miles: {:f}'.format(miles_traveled))

Answers

Answer:

def mph_and_minutes_to_miles():

   miles_per_hour = float(input())

   minutes_traveled = float(input())

   hours_traveled = minutes_traveled / 60.0

   miles_traveled = hours_traveled * miles_per_hour

   print('Miles: {:f}'.format(miles_traveled))

mph_and_minutes_to_miles()

Explanation:

Create a function called mph_and_minutes_to_miles that takes no parameter

Get the code from the main part and put them inside the function

Call the function as requested

Answer:

Check the explanation

Explanation:

Solution(Simplified main code):

# Function written to simplify main code

def mph_and_minutes_to_miles(miles_per_hour, minutes_traveled):

   hours_traveled = minutes_traveled / 60.0

   miles_traveled = hours_traveled * miles_per_hour

   return miles_traveled

miles_per_hour = float(input())

minutes_traveled = float(input())

print('Miles: %f' % mph_and_minutes_to_miles(miles_per_hour, minutes_traveled))

Kindly check the attached image below for the code screenshot and output.

Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and presenting request trends to management each month. Tom uses Microsoft PowerPoint 2016 to create his presentations. As he hovers over each choice, Tom sees his slide change automatically. What Tom is experiencing is called ____.

Answers

Answer:

Live Preview.

Explanation:

This is a feature specifically found in the microsoft power point in detailing or slides showing in a preliminary stage of its previews.

By default, when you select the composing email content and change its text format, such as text font, size, color and so on, the live preview will be displayed when you put your cursor on different text format.

Actually the live preview function can be enabled or disabled manually in Outlook. In this tutorial, we will show you how to enable or disable live preview in Outlook in details.

The Counter Pattern
This pattern is one of the most important ones in all of programming.

It is used to increase the value of a variable by 1. You might call it the counter pattern since it can be used to make a variable that counts up. You'll use this pattern a lot, especially with the draw loop. Let's see what that looks like.
Do This
This program creates a variable counter and then uses the counter pattern to make it count up. When you run the program what do you think you'll see on the screen?
Read the program and make a prediction of what the output will be.
Run the program to check your prediction.
Discuss with a neighbor. Can you explain what you observed?

Answers

You'll probably see numbers counting up, like 1 2 3 4 ...

Mobile providers can be susceptible to poor coverage indoors as a result of: a high degree of latency. network congestion that clogs up the network traffic. an increase in bandwidth demand placed on their networks. spectrum used by most mobile phone firms that does not travel well through solid objects. a lack of sufficient number of towers owing to the not-in-my-backyard problem.

Answers

Answer:

C. spectrum used by most mobile phone firms that does not travel well through solid objects.

Explanation:

Obstructions on the path of radio waves can result to poor network coverage. This is also called Phone reception or coverage black spot. Just as an obstruction on the path of light waves causes the emergence of shadows, so also an obstruction from waves coming from the cell tower. Common culprits are windows, doors, roofing materials, and walls. These solid objects cause an interruption of network for network providers inside a building.

The use of antennas connected from outside the building to inside can be helpful in reducing the effect of this obstruction. Problems resulting could be low signal, difficulty hearing a caller at the other end, slow internet connection, etc.

It creates an SQL statement to find the project that has the most employees from the same department. If more than one project meets the condition, they need to be all displayed in the output. The output should display proj_name, dept_name, and total employees that satisfy the condition.It creates a function called DeptDate to return a table containing dept_no, dept_name, emp_no, emp_fname, and job_begin. This function has a date value as input parameter and it finds employees who start a job on a date later than the input date and puts their data into the return table including dept_no and dept_name of their department. In this same file, you must also include three statements with an input of May 05 of 2016, 2015, and 2014, respectively, to test the function you create.

Answers

Answer:

Check the explanation

Explanation:

As per requirement submitted above kindly find below solution.

This demonstration is using SQL Server.

Table Names used as

department

project

works_on

SQL query :

select proj_name,dept_name,count(emp_no) as 'most employees ' from

project,department,works_on

where

project.proj_no=works_on. proj_no and

department. dept_no=works_on. dept_no

group by proj_name,dept_name

having count(emp_no)=(

select max(empCount) from (

select proj_name,dept_name,count(emp_no) empCount from project,department,works_on where project. proj_no=works_on. proj_no and department. dept_no=works_on. dept_no

group by proj_name,dept_name) as emp);

Which of the following entries into the username and password fields will NOT cause us to gain admin access? You may assume that the system grants access when a legitimate username/password combo is entered. Count the text inside the double quotation marks, but not the marks themselves. For example, a user would enter ("username", "password") and gain access. You may assume that the password to the admin account is not "asdf"

Answers

Explanation: Complete question and answer is attached

This is a program that calculates information about orders of shirts and pants. All orders have a quantity and a color. Write a Clothing class that matches this UML: The no-argument constructor will set the quantity to zero and the color to the empty string. The calculatePrice() method returns 0.0. The two-argument constructor and the setQuantity() method must ensure that the quantity will be greater than or equal to zero. Hint: use Math.abs()

Answers

Answer:

Check the explanation

Explanation:

// Clothing.java

public class Clothing {

//Declaring instance variables

private int quantity;

private String color;

//Zero argumented constructor

public Clothing() {

this.quantity = 0;

this.color = "";

}

//Parameterized constructor

public Clothing(int quantity, String color) {

this.quantity = quantity;

this.color = color;

}

// getters and setters

public int getQuantity() {

return quantity;

}

public void setQuantity(int quantity) {

this.quantity = quantity;

}

public String getColor() {

return color;

}

public void setColor(String color) {

this.color = color;

}

public double calculatePrice()

{

return 0.0;

}

}

_____________________________

// Pants.java

public class Pants extends Clothing {

//Declaring instance variables

private int waist;

private int inseam;

//Zero argumented constructor

public Pants() {

this.waist = 0;

this.inseam = 0;

}

//Parameterized constructor

public Pants(int quantity, String color, int waist, int inseam) {

super(quantity, color);

setWaist(waist);

setInseam(inseam);

}

// getters and setters

public int getWaist() {

return waist;

}

public void setWaist(int waist) {

if (waist > 0)

this.waist = waist;

}

public int getInseam() {

return inseam;

}

public void setInseam(int inseam) {

if (inseam > 0)

this.inseam = inseam;

}

public double calculatePrice() {

double tot = 0;

if (waist > 48 || inseam > 36) {

tot = 65.50;

} else {

tot = 50.0;

}

return tot;

}

}

__________________________

// Shirt.java

public class Shirt extends Clothing {

//Declaring instance variables

private String size;

//Zero argumented constructor

public Shirt() {

this.size = "";

}

//Parameterized constructor

public Shirt(int quantity, String color, String size) {

super(quantity, color);

this.size = size;

}

// getters and setters

public String getSize() {

return size;

}

public void setSize(String size) {

this.size = size;

}

public double calculatePrice() {

double tot = 0;

if (size.equalsIgnoreCase("S")) {

tot = getQuantity() * 11.00;

} else if (size.equalsIgnoreCase("M")) {

tot = getQuantity() * 12.50;

} else if (size.equalsIgnoreCase("L")) {

tot = getQuantity() * 15.00;

} else if (size.equalsIgnoreCase("XL")) {

tot = getQuantity() * 16.50;

} else if (size.equalsIgnoreCase("XXL")) {

tot = getQuantity() * 18.50;

}

return tot;

}

}

___________________________

//Test.java

import java.util.ArrayList;

public class Test {

public static void main(String[] args) {

int totShirts=0,totPants=0;

double sprice=0,pprice=0,totWaist=0,totinseam=0,avgWaist=0,avginseam=0;

int cnt=0;

ArrayList<Clothing> clothes=new ArrayList<Clothing>();

Shirt s=new Shirt(8,"Green","XXL");

Pants p1=new Pants(6,"Brown",48,30);

Pants p2=new Pants(4,"Blue",36,34);

clothes.add(s);

clothes.add(p1);

clothes.add(p2);

for(int i=0;i<clothes.size();i++)

{

if(clothes.get(i) instanceof Shirt)

{

Shirt s1=(Shirt)clothes.get(i);

totShirts+=s1.getQuantity();

sprice+=s1.calculatePrice();

}

else if(clothes.get(i) instanceof Pants)

{

Pants pa=(Pants)clothes.get(i);

totPants+=pa.getQuantity();

pprice+=pa.calculatePrice();

totinseam+=pa.getInseam();

totWaist+=pa.getWaist();

cnt++;

}

}

System.out.println("Total number of shirts :"+totShirts);

System.out.println("Total price of Shirts :"+sprice);

System.out.println("Total number of Pants :"+totPants);

System.out.println("Total price of Pants :"+pprice);

System.out.printf("Average waist size is :%.1f\n",totWaist/cnt);

System.out.printf("Average inseam length is :%.1f\n",totinseam/cnt);

 

}

}

_________________________

Output:

Total number of shirts :8

Total price of Shirts :148.0

Total number of Pants :10

Total price of Pants :100.0

Average waist size is :42.0

Average inseam length is :32.0

Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline. Example output with input 2: 1: Lather and rinse. 2: Lather and rinse. Done. Hint: Declare and use a loop variable. import java.util.Scanner; public class ShampooMethod { /* Your solution goes here */ public static void main (String [] args) { Scanner scnr = new Scanner(System.in); int userCycles; userCycles = scnr.nextInt(); printShampooInstructions(userCycles); } }

Answers

Answer:

import java.util.Scanner;

public class nu3 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter number of cycles");

       int numCycles = in.nextInt();

       //Call the method

       printShampooInstructions(numCycles);

   }

   public static void printShampooInstructions(int numCycles){

                if (numCycles<1){

              System.out.println("Too few");

          }

          if (numCycles>4){

              System.out.println("Too Many");

          }

          else {

              for (int i = 1;i <= numCycles; i++) {

                  System.out.println( numCycles+ ": Lather and rinse");

                  numCycles--;

              }

              System.out.println("     Done");

          }

   }

}

Explanation:

This is solved using Java programming language

The method printShampooInstructions() is in bold in the answer section

I have also provided a complete program that request user to enter value for number of cycles, calls the method and passes that value to it

The logic here is using if .... else statements to handle the different possible values of Number of cycles.

In the Else Section a loop is used to decrementally print the number of cycles

Create a flowchart from start to end. 1.Initialize Z (set Z=0)2.Ask for user’s input X3.If X =1, then continue to the next statement. If X does not equal to 1, end the program.4.While Z is incrementing by 1, print Z. (Note: use WHILE symbol for the flowchart)5.Print Z until Z = 5. 6.When Z = 5, ends the program and print "HW is done".

Answers

Answer:

The flowchart to this question can be given in attachment.

Explanation:

In the given statement, a flowchart is defined, in which we use an oval shape to start the, in the next step square shape is used, that initializes the value 0 in z variable, and an input box is used for user input in x variable.

In the next step, the conditional box is used, that checks variable x value if the value is equal to 1, it will increment the value of variable z by 1. Inside this another, if block is used, that check value of z equal to 5, if the value does not match it will increment the value of z, and prints its value.

A mother calls you to report that her 15-year-old daughter has run away from home. She has access to her daughter's e-mail account and says her daughter has a number of emails in her inbox suggesting she has run away to be with a 35-year-old woman. Write a 2 to 3 page paper/report (not including title or reference page) explaining how you should proceed. Make sure you adhere to the grading rubric and write the report in APA format.

Answers

Answer: Wait, you're asking strangers to write a report for you? Just use common sense--tell her to forward the emails to the police department, or to provide the login details or the IPv4 logs (depending on the email service) to work off of. Considering that she most likely has the email linked to her phone, you should get into contact with her phone provider to locate the daughter. I don't know what else to say considering that you're asking strangers for an essay to be written for you. Hopefully what I said helps, but I doubt that anyone's going to write a full two page essay.

APA offers authors a dependable structure they can use each time they write. Authors' arguments or research are more effectively organized when they are consistent.

What are advantages to write issue in APA format?

The APA format helps papers on usually complex issues to be more understandable. It makes reading and understanding papers easier.

Utilize common sense and instruct her to transmit the emails to the police department, or, depending on the email service, to supply the login information or the IPv4 logs for investigators to use.

You should get in touch with her phone provider to find the daughter because she almost certainly has the email connected to her phone.

Therefore, I don't know what else to say, considering that you're asking strangers for an essay to be written for you.

Learn more about APA format here:

https://brainly.com/question/12548905

#SPJ2

Which programming language will you use to create an App in code.org?

A. Java Script

B. C++

C. Pearl

Answers

Answer:

A. Java Script

Explanation:

java gives languages

Answer:

A. Java Script

Explanation:

That is the only one they teach and is easier than others!

What is SDLC? Explain different phases of SDLC in detail.

Answers

Answer:

systems engineering

Explanation:

In systems engineering, information systems and software engineering, the systems development life cycle, also referred to as the application development life-cycle, is a process for planning, creating, testing, and deploying an information system.

1. INTRODUCTION In this project, you will gain experience with many of the Python elements you’ve learned so far, including functions, repetition structures (loops), input validation, exception handling. and working with strings 2. PROBLEM DEFINITION Present the user with the following menu within a continuous loop. The loop will exit only when the user selects option 7. 1. Enter a string 2. Display the string 3. Reverse the string 4. Append a string to the existing one 5. Slice the string 6. Display the number of occurrences of each letter 7. Quit Program operation: Option 1: Prompt the user to enter a string. Option 2: Display the string to the user. Option 3: Reverse the string and display it to the user. Option 4: Prompt the user to enter a string, then append (i.e. concatenate) it to the end of the existing string. Option 5: Prompt the user for the first and second integers of a slice operation, then replace the existing string with a sliced version of it. Option 6: Print on a separate line each alphabetic character contained in the string. Don’t worry about punctuation, special characters, or whitespace. The letters are not to be considered case-sensitive, so you are free to display them either upper or lower case. Along with each letter, display number of occurrences within the string. For example, if the string is "Hello, World", the output would be: h, 1 e, 1 l, 3 o, 2 w, 1 r, 1 d, 1

Answers

Answer:

See Explaination

Explanation:

def process_string(s):

global char#global varibles

char=[]

global count

count=[]

for i in s:

#checking whether i is alphabet or not

if(i.isalpha()):

#converting to lower

i=i.lower()

if i in char:

#if char already present increment count

count[char.index(i)]+=1

else:

#if char not present append it to list

char.append(i)

count.append(1)

#menu

print("1. Enter a string")

print("2. Display the string")

print("3. Reverse the string")

print("4. Append a string to the existing one")

print("5. Slice the string")

print("6. Display the number of occurences of each letter")

print("7. Quit")

op=input("Enter option:")

#as I don't know what you have covered

#I am trying to make it simple

#checking whether input is numeric or not

#you can use try except if you want

while(not op.isnumeric()):

op=input("Enter valid option:")

op=int(op)

global x

while(op!=7):

if(op==1):

x=input("Enter a string: ")

elif(op==2):

print("The string is:",x)

elif(op==3):

x=x[::-1]#reversing the string

print("The string is:",x)

elif(op==4):

y=input("Enter a string: ")

x=x+y #string concatnation

elif(op==5):

a=input("Enter first integer: ")

while(not a.isnumeric()):

a=input("Enter valid first integer: ")

a=int(a)

b=input("Enter second integer: ")

while(not b.isnumeric()):

b=input("Enter valid second integer: ")

b=int(b)

x=x[a:b]#string slicing

#you can also use x.slice(a,b)

elif(op==6):

process_string(x)

for i in range(len(char)):

print(char[i],",",count[i])

else:

#incase of invalid input

print("Invalid option")

print("1. Enter a string")

print("2. Display the string")

print("3. Reverse the string")

print("4. Append a string to the existing one")

print("5. Slice the string")

print("6. Display the number of occurences of each letter")

print("7. Quit")

op=input("Enter option:")

while(not op.isnumeric()):

op=input("Enter valid option:")

op=int(op)

The arrays list1 and list2 are identical if they have the same contents. Write a method that returns true if list1 and list2 are identical, using the following header: public static boolean equals (int[] list1, int[] list2) Write a test program that prompts the user to enter two lists of integers and displays whether the two are identical. Here are some sample runs. Note that the first number in the input indicates the number of the elements in the list. This number is not part of the list.

Answers

Answer:

See Explaination

Explanation:

import java.util.Arrays;

/**

*

* atauthor xxxx //replace at with the at symbol

*/

public class Test {

public static void main(String[] args) {

java.util.Scanner input = new java.util.Scanner(System.in);

// Enter values for list1

System.out.print("Enter list1: ");

int size1 = input.nextInt();

int[] list1 = new int[size1];

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

list1[i] = input.nextInt();

// Enter values for list2

System.out.print("Enter list2: ");

int size2 = input.nextInt();

int[] list2 = new int[size2];

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

list2[i] = input.nextInt();

if (equal(list1, list2)) {

System.out.println("Two lists are identical");

}

else {

System.out.println("Two lists are not identical");

}

}

public static boolean equal(int[] list1, int[] list2) {

if(list1.length == list2.length)

Arrays.sort(list1);

return true;

else

Arrays.sort(list2);

return false;

// Hint: (1) first check if the two have the same size.

// (2) Sort list1 and list2 using the sort method.

// (3) Compare the corresponding elements from list1 and list2.

// return false, if not match. Return true if all matches.

}

}

Susan was recently fired from her executive IT position. You have concerns that she has enough knowledge and expertise to sabotage company documents—and you need to delete her access. However, upon beginning, you find information that should be retained in her user directory for future company needs. Consider the process you would take to ensure that Susan no longer has access and that data is retained. In situations like this, do you think the benefits outweigh the risks enough to retain user information? Why or why not?

Answers

Answer:

A

To ensure that Susan no longer has access without erasing her files I'll take the following steps:

I'll create a new group and and name it Retired and make sure it has no user privileges at all.Next step is to move Susan's profile to the Retired group. This is ensure that she does not have rights or access to any other user groups.

B

The benefits that accrue to retaining her information will depend on the value of information that her account possesses. As the former executive IT personnel, this is most likely the case.

In the long run, the safest thing to do might be to just back up all information she created and had access to to a remote storage or data warehouse.

Cheers!

Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title. Don't include a constructor or any other methods. Once you have written the class, write a program that creates three Employee objects to hold the following data: Name ID Number Department Job Title Susan Meyers 47899 Accounting Vice President Mark Jones 39119 IT Programmer Joy Rogers 81774 Manufacturing Engineering The program should store this data in three Employee objects and then print the data for each employee.

Answers

Answer:

Check the explanation

Explanation:

#Define the class Employee.

class Employee:

   #Declare and initialize the required member variables.

   emp_name = ''

   Id_num = ''

   emp_dept = ''

   emp_job_title = ''

#Create an object of the class Employee.

emp_obj1 = Employee()

#Assign required values to the members of the class for a

#particular object.

emp_obj1.emp_name = 'Susan Meyers'

emp_obj1.Id_num = '47899'

emp_obj1.emp_dept = 'Accounting'

emp_obj1.emp_job_title = 'Vice President'

#Create another object of the class Employee.

emp_obj2 = Employee()

#Assign required values to the members of the class for the

#current object.

emp_obj2.emp_name = 'Marke Jones'

emp_obj2.Id_num = '39119'

emp_obj2.emp_dept = 'IT'

emp_obj2.emp_job_title = 'programming'

#Create another object of the class Employee.

emp_obj3 = Employee()

#Assign required values to the members of the class for the

#current object.

emp_obj3.emp_name = 'Joy Rogers'

emp_obj3.Id_num = '81774'

emp_obj3.emp_dept = 'Manufacturing'

emp_obj3.emp_job_title = 'Engineering'

#Display the details of each employee objects.

print('Employee 1 details:')

print('Employee Name:', emp_obj1.emp_name)

print('Employee ID Number:', emp_obj1.Id_num)

print('Employee Department:', emp_obj1.emp_dept)

print('Employee Job Title:', emp_obj1.emp_job_title)

print()

print('Employee 2 details:')

print('Employee Name:', emp_obj2.emp_name)

print('Employee ID Number:', emp_obj2.Id_num)

print('Employee Department:', emp_obj2.emp_dept)

print('Employee Job Title:', emp_obj2.emp_job_title)

print()

print('Employee 3 details:')

print('Employee Name:', emp_obj3.emp_name)

print('Employee ID Number:', emp_obj3.Id_num)

print('Employee Department:', emp_obj3.emp_dept)

print('Employee Job Title:', emp_obj3.emp_job_title)

Kindly check the attached image below for the code output.

Answer:

The previous andwers needed a few tweaks to be correct.

Explanation:

class Employee:

  #Declare and initialize the required member variables.

  emp_name = ''

  Id_num = ''

  emp_dept = ''

  emp_job_title = ''

#Create an object of the class Employee.

emp_obj1 = Employee()

#Assign required values to the members of the class for a

#particular object.

emp_obj1.emp_name = 'Susan Meyers'

emp_obj1.Id_num = '47899'

emp_obj1.emp_dept = 'Accounting'

emp_obj1.emp_job_title = 'Vice President'

#Create another object of the class Employee.

emp_obj2 = Employee()

#Assign required values to the members of the class for the

#current object.

emp_obj2.emp_name = 'Mark Jones'

emp_obj2.Id_num = '39119'

emp_obj2.emp_dept = 'IT'

emp_obj2.emp_job_title = 'Programmer'

#Create another object of the class Employee.

emp_obj3 = Employee()

#Assign required values to the members of the class for the

#current object.

emp_obj3.emp_name = 'Joy Rogers'

emp_obj3.Id_num = '81774'

emp_obj3.emp_dept = 'Manufacturing'

emp_obj3.emp_job_title = 'Engineer'

#Display the details of each employee objects.

print('Name:', emp_obj1.emp_name)

print('ID Number:', emp_obj1.Id_num)

print('Department:', emp_obj1.emp_dept)

print('Job Title:', emp_obj1.emp_job_title)

print()

print('Name:', emp_obj2.emp_name)

print('ID Number:', emp_obj2.Id_num)

print('Department:', emp_obj2.emp_dept)

print('Job Title:', emp_obj2.emp_job_title)

print()

print('Name:', emp_obj3.emp_name)

print('ID Number:', emp_obj3.Id_num)

print('Department:', emp_obj3.emp_dept)

print('Job Title:', emp_obj3.emp_job_title)

Jim is a forensic specialist. He seized a suspect computer from a crime scene, removed the hard drive and bagged it, documented and labeled the equipment, took photographs, completed a chain of custody form, and locked the computer in his car. On the way to the lab, he stopped to purchase supplies to use at the next crime scene. What did Jim do wrong

Answers

Answer: Jim left the computer unattended while shopping for supplies to be used at the next crime scene.

Explanation: While transporting the evidence to a secure location (lab), he left the computer unattended in his car and goes shopping for supplies that will be used in his next crime scenes. This act will give the criminals or their accomplice the opportunity to break into his car and tamper with what ever evidence he might have left behind in his car.

Write a Java program which reads a text file and writes the content into a new file. During the read-write process, convert all the upper case letters into lower case ones. In other words, your programming task is to create a new file with the same content of the original file, only that all the upper case letters are converted into lower case ones in the new file.

Answers

Answer:

Kindly go to the explanation part for the code you seek.

Explanation:

This is the Code to Copy:

package file;

import java.io.BufferedReader;

import java.io.BufferedWriter;

import java.io.DataInputStream;

import java.io.FileInputStream;

import java.io.FileWriter;

import java.io.InputStreamReader;

import java.util.Scanner;

public class file

{

public static void main(String []args)

{

try

{

System.out.print("Type a file name: ");

//declare scanner for keyboard input

Scanner reader = new Scanner(System.in);

//scan the input file name

String infilename=reader.nextLine();

//define file stream

FileInputStream fstream = new FileInputStream(infilename);

DataInputStream in = new DataInputStream(fstream);

//define the buffer reader

BufferedReader br = new BufferedReader(new InputStreamReader(in));

String outfilename = "output.txt";

FileWriter fileWriter = new FileWriter(outfilename);

//declare buffer writer for file write

BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);

String strLine,filename;

int status = 0;

int i=0;

//read lines one by one from input file

while ((strLine = br.readLine()) != null)

{

String temp="";

//for each character in a line

for(int k=0;k<strLine.length();k++)

{

char c;

c=strLine.charAt(k);

//if the character is uppercase

if(Character.isUpperCase(c))

//make the character lowercase and append it to the output line

temp +=Character.toLowerCase(c);

else

//character is not lowercase. append to the output line without changing it

temp += c;

}

//write the line to the file

bufferedWriter.write(temp+"\n");

}

//close the input file

in.close();

//close the output file

bufferedWriter.close();

}

catch (Exception e)

{

//System.err.println("Error: " + e.getMessage());

}

}

}

Write a program that encodes English-language phrases into pig Latin. To translate an English word into a pig Latin word, place the first letter of the English word at the end of word and add "ay". For example, "dog" would become "ogday" and cat would become "atcay". Your program should prompt the user to enter an English sentence and then print the sentence with every word changed to pig Latin. (One way to do this would be to split the sentence into words with the split() method.) For simplicity, there will be no punctuation in the sentences. This is sample run of your program: Enter·a·string·to·be·translated:the·fox·jumps·over·the·lazy·dog↵ hetay·oxfay·umpsjay·veroay·hetay·azylay·ogday↵

Answers

Answer:

Explanation:

PiLatinWithMultipleWords.java

import java.util.Scanner;

public class PiLatinWithMultipleWords {

public static void main(String[] args) {

Scanner scan = new Scanner(System.in);

System.out.print("Enter a string to be translated: ");

String s = scan.nextLine();

String words[] = s.split("\\s+");

for(String word: words){

System.out.print(pigLatin(word)+" ");

}

System.out.println();

}

public static String pigLatin (String s){

s = s.toLowerCase();

s = s.substring(1,s.length())+ s.charAt(0) + "ay";

return s;

}

}

Output

Enter a string to be translated: the fox jumps over the lazy dog

hetay oxfay umpsjay veroay hetay azylay ogday

You're helping Professor Joy to calculate the grades for his course. The way his course is organised, students take two exams and their final grade is the weighted average of the two scores, where their lowest score weights 70% and their highest score 30%. To accomplish this, you are going to need to do the following: (1) Build the Student named tuple with the following attributes: name (string) exam1 (float) exam2 (float) (2) Write a function create_student, which will ask the user to input a single student's name, exam 1 score, and exam 2 score. The function will then create a named tuple with this information and return it. (3) Write a function create_class, which an integer n as a parameter, and calls create_student n times and returns a list with the n students created. (4) Write a function calculate_score, which takes a single Student named tuple as a parameter, and returns the final score, where their lowest grade is weighted 70% and their highest grade is weighted 30%.

Answers

Answer:

see explaination

Explanation:

# importing "collections" for namedtuple()

from collections import namedtuple

# function creates student records and return the named tuple

def create_student():

Student = namedtuple('Student',['name','exam1','exam2']) # creating the object Student

# taking input the name and scores of the students

name = input()

exam1 = float(input())

exam2 = float(input())

return Student(name, exam1, exam2) # return the named tuple

# function creates list of student records and return it

def create_class(n):

student_list = []

# creating student data for n students

for i in range(n):

student_list.append(create_student()) # storing data in the student_list

return student_list # return the student data i.e. student_list

# function calculates the final score of each student and returns it

def calculate_score(S):

final_score = 0

if S[1] > S[2]: # if exam1 score is greater than exam2

final_score = S[1] * 0.3 + S[2] * 0.7 # final score is sum of 30% of exam1 and 70% exam2

elif S[1] < S[2]: # if exam2 score is greater than exam1

final_score = S[1] * 0.7 + S[2] * 0.3 # final score is sum of 30% of exam2 and 70% exam1

elif S[1] == S[2]: # if both scores are equal

final_score = S[1] # final score is sum if 30% of exam1 and 70% exam2, but here both scores are equal so final score is equal to any one of the score

else: # if scores are invalid

print('Invalid entries')

return final_score # return final score

# driver function

def main():

n = int(input()) # enter the no. of students in class

if n < 1: # if n is less than 1 return nothing and stop execution

return

student_list = create_class(n) # call create_class to create class of n students

for i in student_list:

print(round(calculate_score(i), 2)) # calculate the final score for each student and print it

if __name__ == "__main__": main()

Create an array of strings. Let the user decide how big this array is, but it must have at least 1 element. Prompt them until them give a valid size. Prompt the user to populate the array with strings Display the longest and shortest string Input an array size for you words array: 5 Now please enter 5 words Input a word: apples Input a word: eat Input a word: banana Input a word: spectacular Input a word: no The longest word is : spectacular The shortest word is : no

Answers

Answer:

lst = []

n = int(input("Input an array size for you words array: "))

print("Now please enter " + str(n) + " words")

max = 0

min = 1000

index_min = 0

index_max = 0

for i in range(n):

   s = input("Input a word: ")

   lst.append(s)

   if len(s) >= max:

       max = len(s)

       index_max = i

   if len(s) <= min:

       min = len(s)

       index_min = i

print("The longest word is :" + lst[index_max])

print("The shortest word is :" + lst[index_min])

Explanation:

Create an empty list, lst

Get the size from the user

Create a for loop that iterates "size" times

Inside the loop, get the strings from the user and put them in the lst. Find the longest and shortest strings and their indices using if structure.

When the loop is done, print the longest and shortest

Other Questions
What factors does the kinetic energy of a body dependon?Ans A 10 meter flag pole casts a shadow 5 meters long. How long will the shadow be if the flag pole is 15 meters tall Segments AD and BE are parallel because they are both horizontal Approximately what percentage of the population of Europe died as a result of the plague Find the measure of y.A.85B.102C.122D.138 Can someone hep me out with this PLEASE HELP ME!!! I ONLY HAVE 2 HOURS!!!I am completing a color sheet for my math class. I have a set of markers with 2 purples, 1 black, 3 reds, 2 yellows, and 2 blues. What is the probability that I will randomly select a red marker, keep it, and then randomly select a yellow marker? A. 47/90B. 3/10C. 1/15D. 2/9 Is the mean age at which American children learn to walk less than 15 months? A study of 40 American children found a mean walking age of = 13.2 months. If the population of all American children has mean age until they begin to walk and standard deviation , which of the following null and alternative hypotheses should we test to answer this question? H 0 : 13.2 vs. Ha : < 13.2 H 0 : = 13.2 vs. H a : 13.2 H 0 : = 15 vs. H a : 15 H 0 : 15 vs. Ha : < 15 please help and explain! i will mark brainliesttt! What type of rhetoric is this sentence?Those of you who have teenage daughters will understand the trauma that can come with online bullying and hateful comments. Pathos Logos or Ethos? PLEASE HELPExplain the effects of the partitioning of india on the people of the region. Combine the like terms to create an equivalent expression:4z-(-3z) Solve for f(2).f(x) = -3x + 3f(2) = [?] What was the primary purpose of the black codes Match the descriptions to the feature,principal axisCenter of the spherical mirror from which acurved mirror was cutcenter of curvatureDistance from the center of a mirror to thefocal pointLine that runs through the center ofcurvature to a mirrorfocal pointPoint where reflected light converges orappears to divergefocal lengthPoint where the principal axis and mirrorvertexmeet CINCO DE MAYOCinco de Mayo is an 1.cultural celebration. The date is 2.observed to commemorate theMexican army's 3.victory over the 4. French empire, under the leadership of General 5.IgnacioZaragoza, France at the time ruled by 6.Napoleon III wanted to establish an 7.empire in Mexicothat would favor French 8._ . The French army of 9._ _attacked the poorlyequipped army of 10._ Mexican's in 11. on May 5th, 12.1862. The victoryof the smaller Mexican army was a 13. to the 14 of the mexican's. Zaragoza diedmonths after the battle due to 15.illness. A year after with 16 _ _troops the French17. _the Mexican army and 18._fell to the invaders where theyinstalled Emperor 19.as 20.of Mexico. The French victory onlylasted 21. years from 22to 23.The Mexican'sMexico City, and Maximilian was 25.-. In June, 186726._was installed as president. According to studies about the 27._that day was first started in 28.in 29.Today, thecommemoration of the battle is not observed as a 30._ _holiday in Mexico. In theUnited States celebrations emphasize the Mexican 31and 33._2432Answers:victory8000illness1862ruleroriginempireEmperor Maximilianannualdefeatedexecuted4000Benito JuarezmusicMexico CityFrenchboost1864CaliforniaculturalIgnacio ZaragozaobservedNapoleon IIIPueblamorale1867nationalinterests30,000recaptured1863cuisine Which of the following is true about foreign and domestic affairs? Group of answer choicesThey are completely separate types of policy issues that do not affect one another.Leaders must consider how one type of policy may affect the other since they relate.The president and Senate are the only groups making decisions on these policy issues.Officials are separated by which type of policy they work on and ignore the other type. Difference between light wave and wave that travels through matter. Which of the following is a component of biodiversity?A the variety of organism species in an area: B the genetic variation within a community of speciesC the variety of different communities in an areaD All of the above are components of biodiversity. Giving brainliest for CORRECT awnser. Steam Workshop Downloader