Questions
python Create a dictionary and insert several English words as keys and the Pig Latin (or...

python

  1. Create a dictionary and insert several English words as keys and the Pig Latin (or any other language) translations as values.

  2. Write a function called bonus that takes as a parameter a dictionary that has names as keys and salaries as values. Your function should increase everyone’s salary in the dictionary by 5%.

  3. Write a function called updateAge that takes as parameters a list of names of people whose birthday it is today, and a dictionary that has names as keys and ages as values. Your function should increment the age in the dictionary of each person whose birthday it is today.

  4. Write a function called seniorList that takes as a parameter a dictionary that has names as keys and class years as values. Your function should return a list of names of students who are graduating in 2020.

  5. Write a function called union that takes as parameters two dictionaries and returns a new dictionary with the entries of both. For common keys, take the value of the first dictionary.

In: Computer Science

Please use C programming to write the code to solve the following problem. Also, please use...

Please use C programming to write the code to solve the following problem. Also, please use the instructions, functions, syntax and any other required part of the problem. Thanks in advance. Use these functions below especially:

void inputStringFromUser(char *prompt, char *s, int arraySize);

void songNameDuplicate(char *songName);

void songNameFound(char *songName);

void songNameNotFound(char *songName);

void songNameDeleted(char *songName);

void artistFound(char *artist);

void artistNotFound(char *artist);

void printMusicLibraryEmpty(void);

void printMusicLibraryTitle(void);

const int MAX_LENGTH = 1024;

You will write a program that maintains information about your personal music library using a Linked List data structure. The program will allow you to add and delete entries from your personal music library, to search your personal music library for songs by song name, and to print out the entire list of your library. This lab will be due in the week of April 1.

Your Personal Music Library. The data in your personal music library will be stored in memory with the use of a linked list, with one list node per song. Each node will contain three strings: a song’s name, its artist, and its genre (the type of music). The linked list must be kept in sorted alphabetical order, by song name, beginning with A through Z (i.e. increasing alphabetical order). No two songs in your personal music library should have the same name. Your program should be “menu” driven, with the user being offered a choice of the following five “commands”:
Command I. Insert a new song into the library. The program should prompt the user for a new song name, its artist’s name, and its genre. This information must be placed in a new node that has been created using the malloc function (to be clear, you must use malloc for this purpose). This node should then be inserted at the appropriate (alphabetical) position in the linked list. Don’t forget that the music library must be stored in increasing order, by song name. If a node with the given song name is already in the music library, an error message should be output, and the new node should not be inserted into the linked list.
Command D. Delete an entry from your the library. The program should prompt the user for the name of the song to be deleted, and then find and delete the node containing that song name from the library. If no node with the given song name is found, an error message should be output. All memory allocated for a deleted entry must be released back to the system using the free function. This includes not only the memory allocated for the node, but also the strings in the node that would have been separately allocated.
Command S. Search for a user supplied song name in the library. The program should print the name, artist, and genre of the song, with each piece of information on a separate line. If no node with the given song name is found, an error message should be output.
Command P. Print your personal music library, in alphabetical order by song name. Print the song name, artist, and genre of each song, each on a separate line. A blank line should be printed between each song.
Command Q. Quit the program. When the program is given the Q command, it should delete all of the nodes in the linked list, including all the strings contained

in each node. Deletion means both removing from the list, but also freeing all dynamically allocated memory using call the free function. It should then print the (what should be an empty) linked list.
To assist you in the production of your program, we have provided you with a file, musiclibrary.c, that contains part of the complete program. This program is provided on the course website along with this lab. This “skeleton” of the lab 9 program includes all of the C statements required to implement the menu driven parts of the program. It also includes a few helpful functions for reading data and printing messages. You should take this file and edit it to become your version of Lab9.c. Note, however, that you may not change any of the code in the existing implementation of the skeleton program, except where indicated in comments. In particular, you must use the inputStringFromUser() function and the prompts provided to obtain inputs from the user, and you must use the given Node structure. In addition we strongly recommend that you do your work for this lab in the following way:

• Read the entire skeleton program carefully. Take note of the provided functions for reading strings, printing the name, artist and genre of a song, and for printing error messages. Using these functions will make it easier for you to satisfy the exercise and marker programs.
• Add the function for inserting a new node(the I command) into the linked list. Your function will need to read the name, artist, and genre of a song. Test your program by trying to insert nodes into the linked list. Try to insert nodes with both new and duplicate song names.
• Add a function for printing the linked list (the P command). Test your program by inserting songs into the linked list and then printing them out. Are the entries in the correct order? • Add a function that searches the linked list for a given song name and then either prints the appropriate song or, if a node is not found, prints an error message. This is the S command.
• Add the statements that need to be executed when the Q command is entered. These statements should delete the linked list by using calls to the free function. To check your work, print the linked list after the elements have been deleted. • Add a function for deleting a song from the personal music library. It will need to search the linked list for a given song name, delete the appropriate node from the linked list, and then use the free function to release the memory used to store the node, as well as all the memory that the node uses for storing strings. If the given song name is not found in the music library, print an error message.
We recommend that you test your program after attempting to complete each step. This way, if your program no longer works, you will know which statements are causing the error. Complete each step before moving on to the next one.

Sample Output From Executing The Program
Here is a sample output from an execution of the program that you are to prepare.

Personal Music Library.
Commands are I (insert), D (delete), S (search by song name), P (print), Q (quit).
Command --> P
The music library is empty.
Command --> I
Song name --> The Shade
Artist --> Metric
Genre --> Rock

Command --> I
Song name --> Heads Will Roll
Artist --> Yeah Yeah Yeahs
Genre --> Punk

Command --> I
Song name --> Bad Boys Need Love Too
Artist --> Bahamas (Afie Jurvanen)
Genre --> Folk

Command --> P

My Personal Music Library:

Bad Boys Need Love Too
Bahamas (Afie Jurvanen)
Folk

Heads Will Roll
Yeah Yeah Yeahs
Punk

The Shade
Metric
Rock

Command --> I
Song name --> Heads Will Roll
Artist --> Yeah Yeah Yeahs
Genre --> Punk

A song with the name 'Heads Will Roll' is already in the music library.
No new song entered.

Command --> I
Song name --> Adult Diversion
Artist --> Alvvays
Genre --> Pop

Command --> P

My Personal Music Library:

Adult Diversion
Alvvays
Pop

Bad Boys Need Love Too
Bahamas (Afie Jurvanen)
Folk

Heads Will Roll
Yeah Yeah Yeahs
Punk

The Shade
Metric
Rock

Command --> S

Enter the name of the song to search for --> Bad Boys Need Love Too

The song name 'Bad Boys Need Love Too' was found in the music library.

Bad Boys Need Love Too
Bahamas (Afie Jurvanen)
Folk

Command --> S

Enter the name of the song to search for --> Young Blood

The song name 'Young Blood' was not found in the music library.

Command --> D

Enter the name of the song to be deleted --> The Shade

Deleting a song with name 'The Shade' from the music library.

Command --> P

My Personal Music Library:

Adult Diversion
Alvvays
Pop

Bad Boys Need Love Too
Bahamas (Afie Jurvanen)
Folk

Heads Will Roll
Yeah Yeah Yeahs
Punk

Command --> Q

Deleting a song with name 'Adult Diversion' from the music library.

Deleting a song with name 'Bad Boys Need Love Too' from the music library.

Deleting a song with name 'Heads Will Roll' from the music library.

The music library is empty.

In: Computer Science

description of each of the four macroeconomic schools of thought we discussed this semester: Model Source...

description of each of the four macroeconomic schools of thought we discussed this semester:

Model

Source of Business Cycle Fluctuations

(i.e., recession)

Major Tenets

New Keynesian View

(Mainstream Model)

Classical View

(Real Business Cycle

Model)

Monetarists

Austrian School

In: Economics

You are trying to decide whether to take a job after you graduate or go onto...

You are trying to decide whether to take a job after you graduate or go onto graduate school. Consider the following questions as you make your decision.

A. Which of these costs, for the most part, would be relevant (R), and which would be irrelevant (IR)?

◦ Cost of your undergraduate education

◦ Salary with an undergraduate degree

◦ Salary with both an undergraduate degree and a graduate degree

◦ Rent

◦ Car Insurance

◦ Graduate school tuition and fees

◦ Food costs

◦ Moving expenses

B. Which of these costs could have a differential amount that is relevant/irrelevant, depending upon the location and or policies of your new job?

In: Accounting

A recent article in USA Today reported that a job awaits 33% of new college graduates....

A recent article in USA Today reported that a job awaits 33% of new college graduates. The major reasons given were an overabundance of college graduates and a weak economy. A survey of 200 recent graduates from your school revealed that 80 students had jobs. At a 99% level of confidence, can we conclude that a larger proportion of students at your school have jobs?

(a) State the null and alternate hypothesis. (b) Determine which distribution to use for the test statistic, and state the level of significance. (c) Calculate the necessary sample test statistics (d) Draw a conclusion and interpret the decision.

In: Math

Problem 1 The restoration approach is usually most appropriate for impairments caused by physical damage. The...

Problem 1

The restoration approach is usually most appropriate for impairments caused by physical damage.
The Middleville School district has discovered mold in one of its schools. The school was constructed
10 years ago at a cost of $30 million. It had an expected useful life of 50 years and hence was 20 percent
depreciated. The cost to replace the school today would be $40 million. The district estimates that the cost
of eliminating the mold and making the associated repairs would be $4,000,000. The entire amount would
be covered by insurance.
1. How much of an impairment loss, without taking into account the insurance recovery, should the district
recognize?
2. What would be the new carrying value of the school after adjusting for the impairment?
3. How much of a net gain should the district recognize taking into account the insurance recovery?

Problem 2

The service units approach is most appropriate for impairments caused by technological obsolescence.
Clarkstown State University acquired specialized laboratory equipment with the expectation that it
would be used to perform approximately 3,000 tests per year over a 10-year period. The cost was $600,000.
After the equipment had been used for only three years and was 30 percent depreciated, the university realized
that the machine would likely be used to perform only 500 tests per year over the following seven years
owing to the introduction of more efficient equipment.
1. How much of an impairment loss should the university recognize?
2. What should be the new carrying value of the equipment?

In: Accounting

Emily rows six miles downstream in 1 hour and her friend Ashley, rowing 1 mile per...

Emily rows six miles downstream in 1 hour and her friend Ashley, rowing 1 mile per hour faster, completes the return trip in 2 hours.

Find the speed of the current (c) and each girls rowing speed.

In: Physics

The New York City school board wants to estimate the mean size μ of AP statistics...

The New York City school board wants to estimate the mean size μ of AP statistics classes in New York City high schools. The board obtained the following random sample of AP statistics class sizes: 24 29 29 23 25 24 33 26 24 29 27 26 22 32 24 21 19 29 31 26 29 31 16

Question 1. Use the data above to construct a 98% confidence interval for the mean class size μ. (calculate y and s to 3 decimal places). lower bound of confidence interval upper bound of confidence interval

Question 2. Mark the following statement as true or false: The probability is 0.98 that the mean size μ of high school classes is contained in the interval calculated above. One submission ONLY; no exceptions. True False

In: Statistics and Probability

Module 5 Abuse and Neglect assignment CASE 3

CASE #3 

You have been assigned to care for the Ross family. The family just had triplets: three girls. The girls were premature, but they are now home after two months in hospital. There are two older children in the family, Ray, age two, and Lori, age five. Although maternal and paternal grandparents are all living, they reside 1600 km away and cannot visit to help. 


The family seems to be loving and close-knit. The parents seem very happy with the new additions- although they admit that the birth of three was very much a surprise. 


You have been with the family for two months and over that time have noticed a change in Ray. He seems less able to run as steadily as he did before. As well, he seems to be using more "baby-talk," not speaking words as clearly as he once did. He also seems to be more fearful. 


Today is your day off. You find yourself in the Ross neighborhood and decide to say hello. As you go up to the door, you see Mrs. Ross violently shaking her son. She is visibly upset and is speaking to him in a very angry voice. 


 1. Describe all the feelings that you (or other PSWs) might have in this situation. Explain how they might be helpful or unhelpful in resolving the problem. (2 marks)

 2. Identify the possible reasons for the angry outburst in Mrs. Ross. 

 3. Identify two behaviors in Ray that indicate that he may be abused. 

 4. What action is appropriate for the PSW to take in this situation? Why? 



In: Nursing

The authors of the paper "Age and Violent Content Labels Make Video Games Forbidden Fruits for...

The authors of the paper "Age and Violent Content Labels Make Video Games Forbidden Fruits for Youth" carried out an experiment to determine if restrictive labels on video games actually increased the attractiveness of the game for young game players.† Participants read a description of a new video game and were asked how much they wanted to play the game. The description also included an age rating. Some participants read the description with an age restrictive label of 7+, indicating that the game was not appropriate for children under the age of 7. Others read the same description, but with an age restrictive label of 12+, 16+, or 18+.

The paper gave data for 12- to 13-year-old girls. Data consistent with summary values in the paper are shown below.

7+ label 12+ label 16+ label 18+ label
4 4 6 8
7 5 4 6
6 4 8 6
5 6 6 7
3 3 10 7
6 5 8 4
4 3 6 10
5 8 6 6
10 5 8 8
5 9 5 7

Do the data provide convincing evidence that the mean rating associated with the game description for 12- to 13-year-old girls is not the same for all four age restrictive rating labels? Test the appropriate hypotheses using

α = 0.05.

Calculate the test statistic. (Round your answer to two decimal places.)

F = ______________

In: Math