In: Nursing
Create a Python program that:
Reads the content of a file (Vehlist.txt)
The file contains matching pairs of vehicle models and their
respective makes
Separate out the individual make and model on each line of the
file
Add the vehicle make to one list, and the vehicle model to another
list; such that they are in the same relative position in each
list
Prompt the user to enter a vehicle model
Search the list containing the vehicle models for a match
If a match is found, display the vehicle make by accessing the
vehicle make list entry in the same relative position the match was
found
If no match is found, display a message saying so to the user
Allow the user to enter name for the file
The program should:
Use variables with meaningful names
Display easily understood prompts when collecting user input
Have appropriate comments indicating what each part of the program
is doing
Have a comment area at the beginning of the program identifying the
author of the program and the class it was created for
Save the program as a Python module, and submit the program through
this assignment
In: Computer Science
A psychologist would like to examine how the rate of presentation affects people’s ability to memorize a list of words. A list of 20 words is prepared. For one group of participants the list is presented at the rate of one word every ½ second. The next group gets one word every second. The third group has one word every 2 seconds, and the fourth group has one word every 3 seconds. After the list is presented, the psychologist asks each person to recall the entire list. The dependent variable is the number of errors in recall. The data from this experiment are as follows:
|
½ Second |
1 Second |
2 Seconds |
3 Seconds |
|
4 |
0 |
3 |
0 |
|
6 |
2 |
1 |
2 |
|
2 |
2 |
2 |
1 |
|
4 |
0 |
2 |
1 |
Step by step on SPSS
a. Can the psychologist conclude that the rate of presentation has a significant effect on memory? Test at the .05 level.
b. Use the Tukey HSD test to determine which rates of presentation are statistically different and which are not.
In: Math
In Python Create a function called ℎ?????. The function has as arguments a list called ?????? and a list call center. • List ?????? contains lists that represent points. o For example, if ?????? = [[4,2], [3,2], [6,1]], the list [4,2] represents the point with coordinate ? at 4 and y coordinate at 2, and so on for the other lists. Assume that all lists within points contain two numbers (that is, they have x, y coordinates). • List ?????? contains two numbers that also represent a point. o For example, ?????? = [3,3] represents the point with coordinate ? at 3 and with coordinate y at 3. • The function must return the point in points closest to center according to the distance calculated using the formula: ???????e = | ?2 - ?1| + | ?2 - ?1| o For example, if ?????? = [[4,2], [3,2], [6,1]] and ?????? = [3,3], then the function must return [3,2] (note that according to the formula the distance between the points is:
▪ |4 − 3| + |2 − 3| = 2
▪ |3 − 3| + |3 − 3| = 1
▪ |6 − 3| + |1 − 3| = 5
In: Computer Science
5. (20%) Suppose we have an array int a [8] = {1, 2, 3, 5, 6};
and we also have a linked list L of 5 entries 1 -> 2 -> 3
-> 5 -> 6, where 1 is the first in the linked list L,
followed by 2 etc. We want to put a new item 4 between 3 and 5 in
the array a and in the linked list L
(a) Explain in plain English how you do that in the array a. You
may have to shift items right (or left?) Do you use a loop like a
for loop? You can write some C / C++ / C# / Java code etc. to
convince me, but the code does not have to run.
(b) Explain in plain English how you do that in the linked list L.
How do you change the link from 3 to 5 in the original list L? You
can write some code or pseudo code to convince me.
In: Computer Science
You are provided with an array of Strings and a list of Strings. Sort the elements (1) in natural order, (2) in reverse natural order and (3) by the length of each String. You can fill in the details by using the following stub file:
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class Midterm01 {
public static void main(String[] args) {
String[] arrayOfCities = { "Atlanta", "Savannah", "New York", "Dallas", "Rio" };
List<String> listOfCities = Arrays.asList("Atlanta", "Savannah", "New York", "Dallas", "Rio");
System.out.print("\nSorting a String array in natural order...");
// your work here
System.out.print("\nSorting a String array in reverse natural order...");
// your work here
System.out.print("\nSorting a String array by length of the Strings...");
// your work here
System.out.print("\nSorting a String list in natural order...");
// your work here
System.out.print("\nSorting a String list in reverse natural order...");
// your work here
System.out.print("\nSorting a String list by length of Strings...");
// your work here
}
}
In: Computer Science
Using Java. The following is a constructor I need to implement but I am not sure how. It also must pass the Junit test. Please give reasoning while answering.
public class LZWDictionary {
// FIELDS
// map (for ease of checking existence of entries)
// list (ease of recall of an entry)
LinkedHashMap<String, Integer> map;
List<String> list;
/**
* Initializes the LZWDictionary to have an initial set of entries taken from
* the set of unique characters in a provided string
*
*
*
* Unique characters are added to a map as they are encountered in the provided
* input string, with an increasing index value (beginning at index 0). At the same
* time, the characters are added to a list. The indices associated with each
* dictionary entry in the map thus relate to their index (position) in the list
*
*
*
*
* @param characters a string of initial characters that may include duplicates
*
* @throws an IllegalArgumentException if the characters string is empty
*
*/
public LZWDictionary(String characters) {
// NOTE: Complete the accessors getMap() and getList() first before running
// your tester on this ctor
}
Must pass this Junit Test
In: Computer Science
21. BUS 320 Survivor Ms. Elaine Taylor owned a farm. Disgusted with all the foul by-products of farming, Elaine and U.C. Santa Clara graduate, Frank Lee Gullible, negotiated for the sale of Elaine’s 100-acre Sutter County, California farm. On July 3, 2020, the day after excelling on her second BUS 320 midterm, Elaine orally agreed with Mr. Gullible on a price of $100,000, one-half in cash payable at closing and the remainder 90 days later. Two days later on July 4th, Elaine sells the farm to someone twice as oblivious as Mr. Gullible, my really Dumb Cousin, for $200,000. On July 8th, Mr. Gullible sends Elaine a letter in which all the terms are included and is signed by Mr. Gullible. Elaine never responds. When the closing date arrives, Elaine tells Mr. Gullible that she sold the property to my Dumb Cousin. Frank Lee Gullible sues. A court would likely find that:
a. This contract is enforceable because Frank Lee Gullible had partly performed the contract by
sending the letter to the Seller, Elaine.
b. Elaine is a real slick operator and Mr. Gullible should have taken BUS 320 at SFSU because this
contract is unenforceable, there is no writing signed by Elaine and my really Dumb Cousin now owns a farm.
c. This contract is unenforceable because the mirror image rule applies.
d. The contract is enforceable under the res ipsa loquitor doctrine.
ANSWER: __________
In: Operations Management
Required information
Problem 6-10 (Algo) Long-term contract; revenue recognition over time [LO6-8, 6-9]
[The following information applies to the questions
displayed below.]
In 2021, the Westgate Construction Company entered into a contract
to construct a road for Santa Clara County for $10,000,000. The
road was completed in 2023. Information related to the contract is
as follows:
| 2021 | 2022 | 2023 | |||||||
| Cost incurred during the year | $ | 2,044,000 | $ | 2,628,000 | $ | 2,890,800 | |||
| Estimated costs to complete as of year-end | 5,256,000 | 2,628,000 | 0 | ||||||
| Billings during the year | 2,170,000 | 2,502,000 | 5,328,000 | ||||||
| Cash collections during the year | 1,885,000 | 2,600,000 | 5,515,000 | ||||||
Westgate recognizes revenue over time according to percentage of
completion.
Problem 6-10 (Algo) Part 4
4. Calculate the amount of revenue and gross
profit (loss) to be recognized in each of the three years assuming
the following costs incurred and costs to complete information.
(Do not round intermediate calculations and round your
final answers to the nearest whole dollar amount. Loss amounts
should be indicated with a minus sign.)
| 2021 | 2022 | 2023 | |||||||
| Costs incurred during the year | $ | 2,044,000 | $ | 3,885,000 | $ | 3,285,000 | |||
| Estimated costs to complete as of year-end | 5,256,000 | 3,185,000 | 0 | ||||||
Solve for "X"
| 2021 | 2022 | 2023 | |
| Revenue | $2,800,000 | X | X |
| Gross profit (loss) | $756,000 | X | X |
Please show you work, I've tried finding the answers to year 2022 and 2023 but nothing is working
In: Accounting
The Bureau of the Census in the United States attempted to count every U.S. resident. Suppose that the counts in the table are obtained for four counties in one region. (Give all answers to four decimal places.)
| County | Race/Ethnicity | ||||
| Caucasian | Hispanic | Black | Asian | American Indian |
|
| Monterey | 163,000 | 140,000 | 25,000 | 39,000 | 5,000 |
| San Luis Obispo | 190,000 | 38,000 | 7,000 | 9,000 | 3,000 |
| Santa Barbara | 230,000 | 121,000 | 12,000 | 24,000 | 5,000 |
| Ventura | 430,000 | 231,000 | 19,000 | 50,000 | 8,000 |
C. If one Hispanic person is selected at random from this region, what is the estimated probability that the selected individual is from Ventura?
(e) If one person is selected at random from this region, what
is the estimated probability that the person is either Asian or
from San Luis Obispo County?
(f) If one person is selected at random from this region, what is
the estimated probability that the person is Asian or from San Luis
Obispo County but not both?
(g) If two people are selected at random from this region, what is
the estimated probability that both are Caucasians?
(h) If two people are selected at random from this region, what is
the estimated probability that neither is Caucasian?
(i) If two people are selected at random from this region, what is
the estimated probability that exactly one is a Caucasian?
(j) If two people are selected at random from this region, what is
the estimated probability that both are residents of the same
county?
(k) If two people are selected at random from this region, what is
the estimated probability that both are from different
racial/ethnic groups?
In: Statistics and Probability