Z Scores Python

Z Scores Python 1

Write a Python script to replace all review scores with their z scores, and based on these z scores, to drop all rows containing outliers. Specifically, you will need the following functionalities.Using any Python method/module/technique/data structure, save column 2 (containing reviewer names) and the header row of variable names from the .csv file of reviews, so that they can be brought back into a transformed matrix later.
As before, save columns 3 through 11 to an ndarray, replace all instances of ‘-1’ (denoting missing values) with NaN, and save the cleaned values to a different ndarray.
Mask the array of cleaned values, then replace all values with their columnar z scores, and next save these z scores in another new array called ‘z_array’.
Save ‘z_array’ to a .csv file called ‘z_array_csv.csv’, while bringing back in the saved column 2 and the saved header row. Use any Python method/module/technique/data structure to do so.
Copy ‘z_array_csv.csv’ to another csv file called ‘no_outliers_csv.csv’. Using any Python method/module/technique/data structure, delete all rows of reviews in ‘no_outliers_csv.csv’ that contain two or more outlier values. An outlier value is any value greater than +3 or less than -3.A suggested Structured English algorithm to complete this assignment is attached here. You are free to fully/partly adopt it or use your own algorithm.

Pattern Finder C++

Pattern Finder C++ 2

Given this string that is the sequence:
TGGTTTAGGGCCTATAATTGCAGGACCACTGGCCCTTGTCGAGGTGTACAGGTAGGGAGCTAAGTTCGAAACGCCCCTTGGTCGGGATTACCGCCATTCTAGTAGTCTAACCCCGAACGCGCTCAGGCTTTGAGTTCGCGCAGCATTAAGAAGTCCATGCCGGCACCGAATGTCCCGACGACAGGCAACCAGCACGGATACCCGCCTTGAAGGCGCAATCAGTAGGTCGAGTTACAGAGGCTCCCCCCGAGCTTGTGCTTCCATTGAGTAGGGGCTATAGATATGTAGCACTCAGGTTTAGTAGCGCCCTTTTAACAGCGAGAGCCCGCCTGGTCAGAACCGAACGGCTGATACGCGAGCTGATGGCTAGAGGATGAACACGGTCCTTCTCTTCGCTTCGATCCGGGGTAGTTTTGTAGCGAAGGATAACGCTCTGTGGATTCTCCGAGAATAATCATCAGTACGGTGTGCGTACCCTCTCTTTGATCCACGCCTGGGGCTGGACATAGTCAGGCGCATTTCATCTACTTAACCCCGGTAAGGGCCACGGGCGCGACATCTCCTTACCAGGGTTGTCTTATGCTCGCTTTTCCCAGATGATAAGCATCTCGTTGTAATGAACAGGTACCTAAGAAAACTGAGTTTCGACGACCCGTCGGCTCGTGTTCTTATCTATTGATCTAACCGAGGTGAAGCTCGCCAAAAATTTCGTAATGTAAGAGAGAAATTGAAGGGGTGAATTTTGCACTCTCGTGCATACGTCTTGCTACAATAGCAAGAGCTGTATGCGTGCGACCACTTCACTACCTCTATAGCATGCGATCTCGCAGCCCGGATTGTCGCCTCCTTTGGGCCGCAAAAACGGTATACGGACACACTGCATCTGTGAGCACGCACCAACTCGATGCGCGTAATAGGCATCTGCTCCACCCAGGGGGCAAGGGCACCTGAGGACGATCTGTTCCGAACAGTATATTTGAGCCAATGTTCTATTAGTGAAGGCAAGGTGAGGGCAACTCACACTGGTACCTCGAGGAGTAATCCGATCCATCTAAACTGGCATGCCCGTTCGAGCTCGGGGGGTTCTTGAATTTAGCTGCGTGTACCTCAGGTCTCCTGAAGGTGACACCAAAGTACAAGATAGATAGATAGATAGATAGGTAATATCTGACGTGAATTGCTTACCGCTAGTGAGCGATTTAGGTCACGTCCTCTGAAGATGTACCGTGATCATCGATGAAATGGCTCTGCAGAGCGTTGCTCTTAACTTAGTGGGAGTGTTCCTTTGCAGTCTGATGAAGTCGCTGCATGTTAACTTTGCACTAAGGGCGTTTCCGAACCCTATAGTCATCCTTATTGATTCGCCCTGTCTTACCCAGGATACACTACCGTTCGAGGCTCTTAACGTACCAACGCATGCAGTCAGAAGATGATTCACCATCCAAGCAAATCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTCTGTGGCTTTAAAGCACCGAATGTAGTTGGCCATCGGTCTCGGTCACCAATAAGACGGCCTCGTGGGTCACTCGGTCGATGATCTAGGGTCGGGTGCATAGTGTTTCAGGTCGGCGCTCAGGGTTCTTGTCAGGGAAATCTACGGGTGAGTTGGAAAGCGCCGCCAGCGAGATGCCTGTAGGCGATTAGTGTAGAGAGAGCAACATCGGAAAATTGTCCGTGGGGCGCTACGTAAGTGTTCCCAGTATTCTCGTCCAGAGTAAGTCATGCATACCAGTATCAGGCGTCTGTGTGTTACGTTGCAGTGTATCCCGGTAGCGGGAAGCGTATAGAGCGTAACAGACCTGTCCTACAGCACGCAGGATGTCGACCCTTTCTCAGGCACGATACTTCGTGTAACAGCAGTTCCGGTGTCATCTGTAACTGTTCTGTGTTCCATAGTGAAGATATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCTATCGGGCGACCCTGGCAATCAGGCGCCTGCTTATATGACAATTTGTCGCAATACGGGTCGCAGATGTATTGTCCGCATGAGTTTACGGTATCCGGAACTGTCACCGCCGATCCAATATGATCGCAAATCGGGGTGACACAATGGACCGCCGTAGATAAACCCTGCGATGCTGCAATAAGGATATGATATCGCGCGCGGGCCGTAAAACCGATCTTGGAAGGCGGGAAGTCTCCGGGAAAAACTCTCTGATAAAGCCTATTACAAGAAGAGCTCGAAGGCAAGATGGGCATGCCCCGTCGACCACACGGGCAAGCTCTGAGAATCGATGTGGTCGCTTAACCAACCCATACGGAGTGAACGAGACCACGCGGGCGGTTCTTGGTACGCATGATTCCTATTGGTTCTGCCGGGCGTGTGCAGGATTGTTCACTCCCCACCCTGTCGCTCACGAACGCGCTGGTTGCTTAAACCGACCGGAAATTCTGTAGCCGCCCCGTAAGTTTAACGCTTTGAAATACTCCACATGTGCGTACCGGGTCTGATCGCTTACGTGGCGCCACTATGTTAGGAGCTCATAGATATCGATGAATCAAATGTCTTTCATCGCTCCTTAAACAACCTGACGTATTCGCAAAATTGCGCGTATTGAGAAGGGAAAGTTAAAGGAACGATAACAATGAGTCTGCTTTCACCGGCTGCATAACGGGATCGCGCGCTATGGGATTTCCTAACTATAAT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TTTCTTTTTTTCTTTTTTTCTTTTTTTCTTTTTTTCTTTTTTTCTTTTTTTCTTTTTTTCTCAGATGCGGATCAAGGGTTACTCGAGCCGTTCTGAGGTCCTAAAATTTTAGCCCTTGGTGTTAGCTTCGGTTTAAGAACGTAGGTGCGACGCGGGGGTCCTAGAGCTCCGCGATCTGCACTCCCCACCTGGCACCAAAACGAATCCTGCATAACGGCTCTCTGTGCATGGGGGATGGTCGCAACAACGAGCATAGCTGGCATCACTTCGTTTGCTGTGGATTGCTGTTTTATACAGAATACGGTGGTGATCATCAAAGGAAGCATAATCCACATCGGGCACCCCGGGCCATCGTGCGTTCCCTTATAGCCGGCTTGCATGTTGGGGGAGGAGTAAGGCCGGTAACGTCTCGCAGCACTGTCGCGTAACACAGGTACATCTTTATTTCCGGTGCTGTAGAAGTGGTTTTTCGAAGGCGTAACCCAGAACGACTGATATAATAGTCCACTATTCCCTGGTTTAAGACTTCTACAAAGTTTTACGCAAAGTTACATGCACACTCGGCGACGTAAATATTAGCCTTGCTAAATTGCCACGGATATTAATCCCGAGCCAACCTGTTCCCACTAGCGGTCTACGGTCATAGTCCTTTGTGTAGAGCGTCATTGCGGTTGGGGCCCGTCCGCGGAGGTTCCCCTTATGATCTAACCGCGGTGCAGGTTGACTGAATGCCATACACTATAGAGAAGACGTCTAAGTAGAAACGTTCTTTAAAAATCTTGAACTGACGGCCGAGTATTATCAAGAGAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCAGATCATGCACAATAAGGTTAGAAGCAGCAAGCATGTATTCTTTGCATAGAGGCGGTAAAGCCGCCTTGCATACCCAGCAGCAGCCGCGAAGGCCTTACTCCAGAGGACAGAACTTCTCACACAGCGTCCGCATACACCGCGGACGTGACAAGGTTAGATAGCTCTAGTTTGCGGCAACCCTCGCATCAGGCCGACTCACCCGCGCTTGCTACCCGGAGGATGGGTCAAGGGATAAACATAGCACGTTAGTTAAGCCTAACGTCAGTTTTTAGAGTTTACATGCACGACTAAGTGCATCGAAATACACGCCGTTGACAGACCAACAGCGTGTCAACTGGGCCTTGAGAATTGTATCATAATAGCCAAATACGAGGCCAAGTAGTCCGACGAGAGGCACGTAGAGACCACTTTCCCTAAACGATCTGTCGCATTACCCTTTGACTCGCACCCTATGCCTTATGTTCCAAGCAGCACCGAAGTTAGATTTAAGGGCGTATCTATCGGTACCTCGGTTGGGCCGGTCCACAGCTCCAGCTGAATTAGTGCTCACCCCGCTTCGAGGTTGAGTAAGGGTCACTTTTAAAAATATGCTTAAGGGTGATTCACATGACAGTAATCGAATAGTGAGATATAAGTAGGTGCGCCCCGCGCACACATCAAAACTGTGCAGACTGAAACTGAATGCTGGAGGCTGAGGAAAATGAAGATCAGAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGTCTAGAGAAGAGTGAATGAATAGATCTGCCGCTGAATCCCCGCGTGAGGTTTTTGCGAC

Get the maximum consecutive occurrences of the pattern “AGATC”
The result should be 37 because it’s the maximum consecutive occurrences given that pattern

IT280 Python Convertor

IT280 Python Convertor 3

Project Objectives:

The final project will require students to master and apply the core python concepts and programming skills acquired during the semester. Students will also apply critical thinking, problem-solving, design skills as well as demonstrate the ability to plan, organize, manage time, write documentation, and present the project solutions in front of the class and/or audience.

Project Overview:

The Python Convertor is an individual take home project. Students will write and complete the python program (lastname_convertor.py) and documentations in one (1) week.
The project should simulate a length units convertor which allows conversion from inches to feet, inches to yards, and inches to miles.

In completing this project, the requirements are as follows:
• Appropriate declarations and initializations of variables and constants.
• Appropriate data types and conversions.
• Correct mathematical calculations.
• Appropriate functions definitions and calls.
• Fully commented program.
• Correct control and loop structure.
• Accurate output display.
• Use of Object-Oriented Approach.

A Sample Run is given as a reference on the last page of this document.

Project Specifications:

The program should ask the user to enter his/her name then repeatedly displays the menu as shown below:
1. Choice 1: Convert Inches to Feet
2. Choice 2: Convert Inches to Yards
3. Choice 3: Convert Inches to Miles
4. Choice 4: Exit the Program

The program should display the result or an error message as appropriate. After an operation is finished and the output is displayed, the Menu is redisplayed. You may choose another operation or enter 4 to exit the program.

All the Tasks has to be defined within functions and named properly including the displayed menu: a minimum of 4 functions has to be defined. The project should use the object-oriented approach by defining a class and creating objects.

Top Movies JAVA

Top Movies JAVA 4

Write a Java program to do the following :• Use this file for input movies.txt (see attached file)• Load the records to an array• Sort the movies by Year• Report1 – Output Report1 to console (see sample report)Current Date and Time
“Top Movies of All Time – Sorted by Year”
List all movies in order by year
• Sort the Array by Title (you will need to figure out a way to do this)• HINT: There are several ways that you can manipulate this data to get it sorted by title. One way is to use the .replace() string method or .replace() Arrays method.• Report2 – Output Report2 to ConsoleCurrent Date and Time
“Top Movies of All Time – Sorted by Title”
List all movies in order by Title
• Output to a txt file named moviesYYYY-MM-DD_hh-mm.txt, all movies released from 2000 to present. See the “Research Challenge” below for specifics on formatting the file name.•METHODSsFileToArray() – setup this method to be able to open ANY file of String data and input that data into an array. You determine the appropriate arguments and return value.
Ask the user to enter the name of the file and the number of records in the file.
Use this method in your program, when you load your array of movies.
sFileOutput – setup this method to be able to output ANY String data to a file. You determine the appropriate arguments and return value.
Use this method in your program, when you write your 2000 – Present movies to a file.
report1() – setup this method to create and output report 1. You determine the appropriate arguments and return value.
report2() – setup this method to create and output report 2. You determine the appropriate arguments and return value.
Write all the methods in the SAME class file as your main(). (This will make it easier for me to grade).Challenge (REQUIRED) :• Format the file name of your .txt output file with the current date and time as follows.moviesyyyy-mm-dd-hh_mm.txt. This is called a dateTime stamp and is a useful way to create an archive of files. Each time your program creates a new file it will automatically have a unique file name identified by the current date and time it was created.
For example: Your file would be movies2021-11-24-14_54.txt if it was created on November 24th, 2021 at 2:54pm.

StudentCourse Python

StudentCourse Python 5

Here is a skeleton for a class representing a student. Complete the Student class by filling in the methods. A student has four properties — his/her name (a string), year (an integer, where 1=freshman, 2=sophomore, 3=junior, 4=senior), major (a string), and courses (a list of Courses). These fields must be private (i.e. not accessible outside the class except via the functions you’ll write). The Course class is provided and you should not change it, however you will need to call some Course methods from within the Student class. In addition to __init__, you’ll also need to complete the following four methods:a.) numCourses – takes no parameters and returns the number of courses the student is taking
b.) isUpperClassman – which takes no parameters and returns a boolean value indicating whether the student is an upperclassman (juniors and seniors are upperclassman)
c.) totalHours – takes no parameters and returns the total number of credit hours the student is taking
d.) _str_ – takes no parameters and returns a string representation of the studentSample Run:s = Student(‘Candice’, 1, ‘Chemistry’, [Course(‘CH 301’, ‘Laude’, 3), Course(‘CS 303E’, ‘Young’, 3), Course(‘UGS 303’, ‘Murry’, 3), Course(‘M 408C’, ‘Davis’, 4), Course(‘GOV 310L’, ‘Moser’, 3)])
s.isUpperClassman() -> False
s.numCourses() -> 5Sample Run:s = Student(‘Candice’, 1, ‘Chemistry’, [Course(‘CH 301’, ‘Laude’, 3), Course(‘CS 303E’, ‘Young’, 3), Course(‘UGS 303’, ‘Murry’, 3), Course(‘M 408C’, ‘Davis’, 4), Course(‘GOV 310L’, ‘Moser’, 3)])
s.totalHours() -> 16Sample Run:s = Student(‘Candice’, 1, ‘Chemistry’, [Course(‘CH 301’, ‘Laude’, 3), Course(‘CS 303E’, ‘Young’, 3), Course(‘UGS 303’, ‘Murry’, 3), Course(‘M 408C’, ‘Davis’, 4), Course(‘GOV 310L’, ‘Moser’, 3)])
str(s) -> ‘Candice is a freshman Chemistry major.’

Savings Account

Savings Account 6

Design a Savings Account class that stores a savings account’s annual interest rate and balance. The class constructor should accept the amount of the savings account’s starting bal ance. The class should also have methods for subtracting the amount of a withdrawal, adding the amount of a deposit, and adding the amount of monthly interest to the balance. The monthly interest rate is the annual interest rate divided by twelve. To add the monthly inter est to the balance, multiply the monthly interest rate by the balance, and add the result to the balance.Test the class in a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, andthe number of months that have passed since the account was established. A loop should then iterate once for every month, performing the following:a. Ask the user for the amount deposited into the account during the month. Use the class method to add this amount to the account balance.b. Ask the user for the amount withdrawn from the account during the month. Use the class method to subtract this amount from the account balance.c. Use the class method to calculate the monthly interest.After the last iteration, the program should display the ending balance, the total amount of deposits, the total amount of withdrawals, and the total interest earned.

Jukebox HeroIn C#

Jukebox HeroIn C# 7

Jukebox HeroIn this problem, you will be creating a dictionary that will store album names and a list of songs on that album.First, start by creating a Dictionary that will use a string of the album name as the key. The Value Pair will be a string list. This list will contain each song’s name as an element.There must be at least (4) song names on every album.Then create at least (4) elements in the dictionary. These can be any Album & it’s matching songs that you would like.Explain to the user that you will be showing them a list of album names and prompt them to choose a name to get the songs on that album. Remember to validate this prompt to ensure they are typing in a valid album name.Then create a loop that will cycle through the List (value pair) and print out the names of the songs.User Inputs:The chosen Album NameResult To Print Out:“The album X has the following songs:Song1Song2Song3Song4Song5, etc..”Where X is the Album name.
Where Song1-5 are the names of the songs on that album.
These variables must use the Key and Value Pair from the Dictionary.

Lab19C

Lab19C 8

Write a program called Lab19C that searches for a number in an array.
a. Write a bool function named search that receives 3 parameters: an int array, an int containing the length of the array, and an int number to search for. Return true if the number is ***** the array and false otherwise.
b. Write a void function called fillArray with the array as a parameter that uses a for loop to read the text file (Lab19C.txt) 20 times and place the values in the array.
c. In the main function, do the following:
i. Declare an array of 20 integers.
ii. Ask the user for a number to search for in the array
iii. Call fillArray sending the array as a parameter.
iv. Call the search function and send the array, the length of the array (20), and the search number as parameters.
v. Print the search number and the value returned by the function along with appropriate label to say if the number was found or not.

CarDealershipSystem

CarDealershipSystem 9

Object Oriented Practice Problem
Create a UML Diagram that provides design specifications for a list of objects. Design a class of objects to keep track of any one of the things listed below.
( I selected the list highlighted in yellow)
1) For the object you choose, write a paragraph describing the data that needs to be stored for the object,
2) List the methods needed and what the methods for the object need to do.
3) Create an annotated UML diagram that shows appropriate properties and methods for the object. Save a version of the file in PDF format. Submit the file in PDF format.
Suggestions for Objects to pick from
• Cars for a car dealership. (I picked this one)
• Patients in a hospital.
• Doctors in a hospital.
• Coffee beans used by a coffee shop.
If you want to use a more sophisticated program there are a few good free pieces of software that you can use:
• https://umbrello.kde.org/ (Links to an external site.)
• https://www.eclipse.org/papyrus/ (Links to an external site.)
• http://dia-installer.de/ (Links to an external site.)1) Write a paragraph describing the data that needs to be stored for the object:

Payroll JAVA

Payroll JAVA 10

Design a Payroll class that has fields for an employee’s name, ID number, hourly pay rate, and number of hours worked. Write the appropriate accessor methods and a constructor that accepts the employee’s name, ID number, hourly pay rate, and number of hours worked as arguments.
The class should also have 2 methods:
1. getGrossPay() that returns the employee’s gross pay, which is calculated as the number of hours worked multiplied by the hourly pay rate.
2. getEstimatedTax() that returns the employee’s estimated tax, which is 30% of the gross pay.
Write a program that demonstrates the class by creating two Payroll objects, then asking the user to enter the data for two employees. The program should display employee’s name, ID number, the amount of gross pay earned and the amount of estimated tax. Here is an example of the program’s output:Enter the first employee’s name: Name One
Enter the first employee’s ID number: 1000
Enter the first employee’s hourly pay rate: 100
Enter the number of hours worked by the first employee: 160
Enter the second employee’s name: Name Two
Enter the second employee’s ID number: 2000
Enter the second employee’s hourly pay rate: 50
Enter the number of hours worked by the second employee: 160
Employee Payroll Data
Name: Name One
ID Number: 1000
Hourly pay rate: 100.0
Hours worked: 160.0
Gross pay: $16000.0
Est. Tax: $4800.0
Name: Name Two
ID Number: 2000
Hourly pay rate: 50.0
Hours worked: 160.0
Gross pay: $8000.0
Est. Tax: $2400.0

×
New Download