1. The following code is relevant to this question:
Question 1a:
What is the overall purpose of this code? What does this code hope to predict? Based on what factors does it form that predictions (i.e. what are the independent/predictor variables of the model)?
Question 1b:
What is the purpose of lines 31 through 36? Why do apply such code to passenger class and sex, but not other variables such as age and fare paid?
Question 1c:
What does line 38 do? (Be specific.)
Question 1d:
What is the purpose of lines 39 and 40? What are we trying to avoid by using lines 39 and 40?
Question 2:
Suppose lines 52, 53, and 55 produce the following results.
Interpret lines 52, 53, and 55 and their output in the context of this question. Be thorough in your explanation. What does this imply about survival probabilities?
Question 3:
A data analyst performs a linear regression analysis on a piece of data. Suppose the analysis computes an r2 value on a randomly selected subset of data that is used as a training set. The analysis also computes an r2 value on the remainder of the data set which is used as a testing set. The r2 value on the training data set was 0.7813. The r2 value on the testing data set was 0.7754. Assume that both the training data set and testing data set have large sample sizes (i.e., there is no problem with the samples being too small).
(a) What should the analyst conclude about the predictive ability of the model?
(b) If the r2 value on the testing data set was 0.082 (instead of 0.7754), what should the analyst conclude?
Question 4:
Suppose there is a Pandas data frame called weeklyEmployeeInfo. In a column of the data frame titled “Base Hourly”, the hourly base pay of the employee is listed (e.g. an entry of 12 in this column means $12 per hour). A column titled “HoursWorked” lists the total number of hours worked by the employee over the past week. An employee is paid their hourly base pay for up to the first 40 hours of work. Any work beyond the first 40 hours is paid at a rate of 1.5 times the hourly base pay. Write code using Numpy and/or Pandas functions to compute the sum total of all wages to be paid to the employees this week.
Question 5:
Define a Python function that converts Celsius temperatures to Fahrenheit. Then use the function to convert each temperature -40.0C, -39.0C, -38.0C, …, 49.0C, 50.0C. Try to be efficient in the code you write. Print the converted temperatures to the console window. (The formula from Celsius (C) to Fahrenheit (F) is F = 1.8 * C + 32.)
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme