The popularity ranking of baby names over the last 100 years (1920-2019) is downloaded from http://www.ssa.gov/oact/babynames/decades/century.html and stored in the file named "babynameranking.txt". Each line contains a ranking, a boy's name, number for the boy's name, a girl's name, and number for the girl's name. For example, the first two lines in the file "babynameranking.txt" are as follows: 1 James 4,735,694 3,265,105 Mary Patricia Jennifer John 4,502,387 4,499,901 1,560,897 1,467,664 3 Robert So, the boy's name James and girl's name Mary are ranked #1 and the boy's name John and girl's name Patricia are ranked #2. 4,735,694 boys are named James and 3,265,105 girls are named Mary. Write a program that prompts the user to enter the gender and followed by a name, and displays the ranking of the name.
Q: When using the 7th option, you should create a personnel using their name and surname. When using…
A: Code is given in next steps:
Q: You have a list of student ID’s followed by the course number (separated by a space) that the…
A: import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class Main{…
Q: Subtract each element in origList with the corresponding value in offsetAmount. Print each…
A: The answr is given below:-
Q: theater seating chart is implemented as a two-dimensional array of ticket prices, Like this 10 10 10…
A: Solution Programming Approach Import necessary package create main class create scanner class…
Q: An archery target consists of a central circle of yellow surrounded by con-centric rings of red,…
A: Lets see the solution.
Q: Use Arrays to create a Java Program that takes in from the user the grades of a student (until…
A: The program is below implemented in java:
Q: for my python class I am to write a program to modify immages. the image format being used is a PPM.…
A: class PPM(object): def __init__(self, infile, outfile): self.infile=infile…
Q: Write a program that has an array of at least 10 string objects that hold people’s names and phone…
A: #include<iostream>#include<string>#include<cctype>using namespace std; #define…
Q: In this programming challenge, you will create a simple trivia game for two players. The program…
A: Given The answer is given below.
Q: studentNumber (int), courseCode (char array [8]), finalGrade (float). 200201078 CENG104 89.75…
A: Declare an integer variable to store user input for options from 0 to 6. Declare variables to hold…
Q: In the class Student, create a method for each of the following results using the array concept and…
A: Summary: Java supports object-oriented programming. The class student is declared and a 2d array is…
Q: Initialize a variable for the row, and set it to zero. Then, create a for loop from 0 to the total…
A: public static int[] oneMonthGenerator(double longitute, double latitude, int month, double[][]…
Q: File Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type O Tomato O small: $25.00…
A:
Q: For this part in the assignment, you need to write a program in python that removes all instances of…
A: Solution for given question - Python program for the provided problem statement # this function…
Q: Html/javascript!!!!!! First, create a deck of cards. Now, write test code that shows you can sort…
A: here, first, we have to create a deck of cards. then we have to write test code that shows that we…
Q: Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the…
A: Following is the java program that defines an arrayList of type string. Add() method is used to add…
Q: Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to…
A: Short Summary: Implemented a windows forms application named “GuessAWord” using C# You can modify…
Q: For the supplied code, produce a sales report that shows customers, products, prices, total price…
A: The code is as follows.............................. // Here we are importing the necessary…
Q: Write an activity that takes the list of hours and then returns the total weekly wage. Listing hours…
A: Write an activity that takes the list of hours and then returns the total weekly wage. Listing hours…
Q: Read the file containing integer values and add these values to the list. ArrayList • For…
A: Create the file with the intergers. In the main method create the arraylist of the integers. Then…
Q: Doctor signature:String doctorID:int medicine:Arraylist Doctor(signature:String,doctorID:int)…
A: This UML is implemented in java using object-oriented programming. Since there is no language…
Q: mat {name, weight, expiryDate}, write a function that prints the sum of the weights whose expiryDate…
A: Given an array of objects with format {name, weight, expiryDate}, write a function that prints the…
Q: Here you are required to draw a bar chart of batchwise strength of Avionics Department with…
A: import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() Batch =…
Q: Exercise 2. (Pascal's Triangle) Pascal's triangle Pn is a triangular array with n+1l rows, each…
A: Coded using Python 3.
Q: We will put the data into a file n_bikes.txt, one number per line, and will post it in this…
A: def main(): # Open mynumbers.txt for reading i=0 a=[] sum=0 myfile =…
Q: Create an ArrayList, Named it Husnain that can hold Integers, and fill each slot with a different…
A: By specifying the number n, we can generate the random number from 0 to n-1 So, add 1 to this, and…
Q: Use the Active Code window below to create 4 parallel arrays and intialize them using initialization…
A: Answer is given below .
Q: convert this code to JAVA location = [] size = [] rover = 0 def displayInitialList(location,…
A: Dear Student,There were details missing in the code like The methods allocateMemory() and…
Q: A teacher has five students who have taken four tests. The teacher uses the following grading scale…
A: #include <iostream> using namespace std; int main(){ string names[5];char…
Q: read a csv file and put each row into an array, if a user inputs number '1' it will retrieve the…
A: import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import…
Q: Submission Instructions Follow the instructions for How to Submit Programming Assignments.…
A: Following is the java program which takes as input string of integers from command line and save it…
Q: The Grades.java class file has a studentScores array with 6 elements. Add a loop that will Check…
A: Please find the answer below :
Q: JAVA LANGUAGE Create an ArrayList, Name it YourRegNoandName that can hold Integers, and fill each…
A: import java.util.*;import java.lang.*;import java.util.Scanner;public class main{ public static…
Q: File Welcome to OOPII PizzaMania Each Topping: $150 Pizza Size Pizza Type Tomato O Small: $25.00 O…
A: The java code is
Q: File Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type Tomato O Small: $25.00 O…
A: According to the information given:- We have to create a pizza ordering program.
Q: You have to use comment function to describe what each line does import java.io.BufferedReader;…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Write a program that do the following: Ask the user to input his/her first name and store it in a…
A: import java.util.*; class TestClass { public static void main(String args[] ) throws Exception {…
Q: Write a program in C++ programming language that: I. records the basic information of a patient…
A: #include <iostream>using namespace std;//method to conver Fahrenheit to celsiusvoid…
Q: two ArrayLists: list1=[10,20,30], and list2=[40,50], what is the content of the list1 after…
A: two ArrayLists: list1=[10,20,30], and list2=[40,50], what is the content of the list1 after…
Q: Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the…
A: Following is the java program: Approach: An ArrayList(sting type) is defined. Names of…
Q: Java Create an ArrayList of strings to store the names of celebrities or athletes. Add five names…
A: I have added the comments. I have also added the screenshot of the output for better understanding.…
Q: Create an action that takes the planet as an argument and returns its escape speed expressed in m/…
A: Algorithm - Define all the given constants. create a method with planet argument. now create a…
Q: Doctor -signature:String -doctorID:int - medicine:Arraylist +Doctor(signature:String,doctorID:int)…
A: This UML is implemented in java using object oriented programming. Since there is no language…
Q: Results are not the same at the end and I do not get the right result after choosing number 3. The…
A: While entering the record for the student, the buffer for the input requires to be cleared. It can…
Q: Which of the above choices (A, B, C or D) prints the name of each animal in the animalList object…
A: For printing all the names from the given list of animals we need to iterate over each index of the…
Q: For example, suppose the word “robot” is found in lines 7, 18, 94, and 138. The dictionary would…
A: Program screenshot:
Q: A class with 10 students will take 3 exams. Use 3 arrays to hold the scores for each student and…
A: Since you are not mentioning the programming language, here we are using Java to complete the…
Q: The Grades.java class file has a studentScores array with 6 elements. Add a loop that will Check…
A: Please find the answer below :
JAVA
I need help making this java code, here is the link that is within the question http://www.ssa.gov/oact/babynames/decades/century.html
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- #Data is given in the order: Serial Number | Item Name | Quantity | Priceprice_list = [["01","Keyboard",4,200.0],["02","Mouse",4,150.0],["03","Printer",2,300.0]] #Write Code to increase the price of all the items by 50 taka #Code1 #Write code to add a new item to the list using user input #Code2 print()#Print the list using nested loops #Code3 #Sample output given below: Enter Serial: 05Enter Item Name: MonitorEnter Quantity: 200Enter Price: 50 01Keyboard4250.0-----------------02Mouse4200.0-----------------03Printer2350.0-----------------05Monitor20050-----------------Cargo Container Report. You will be producing a program which will allow the user to generate the container report on the following page in Container Number order or Ship Name order. The program will also the user to lookup the data for any given Container by number. The % cargo weight is the percentage of the cargo of the gross weight (cargo weight/gross weight), % total is the percentage of the cargo for that container of the total amount of cargo unloaded (cargo weight for the container / total cargo unloaded. Hint: you are expected to use methods for your calculations. The accompanying file has the data for the containers unloaded today. The data includes container number int ship name. String tare weight of the container (empty weight) int the gross weight (container plus the cargo). Int You will need to computer the cargo weight as the gross weight minus the tare weight. If you have issues reading the data with the String, you may remove the String. However, you will lose points.…1994 Weekly Gas GraphIn the student sample programs for this book, you will find a text file named 1994_Weekly_Gas_Averages.txt. The file contains the average gas price for each week in the year 1994.(There are 52 lines in the file.) Using matplotlib, write a Python program that reads thecontents of the file then plots the data as either a line graph or a bar chart. Be sure to displaymeaningful labels along the X and Y axes, as well as the tick marks. (in python)
- 1. The timeclock.txt file contains the hours worked data for every employee as well as the shift they worked. The layout for the file is as follows: EMPLOYEE NUMBER, HOURS WORKED, SHIFT 2. The personnel.txt file contains the names of all employees and their hourly pay rates. The layout for the file is as follows: EMPLOYEE NUMBER, EMPLOYEE NAME, PAY RATE Note: Both the timeclock.txt and payroll.txt files are pre-sorted by EMPLOYEE NUMBER in ascending order. Business Rules 1. For hours <= 40, the employee gross pay is: HOURS WORKED PAY RATE 2. For hours> 40, the employee gross pay is: HOURS WORKED PAY RATE 1.5 3. For shift 3, add $1 per hour to the employee pay rate The program should: 1. Download both input files in the same folder that you will create your .py program. 2. Read both input files together. 3. Match the input files by the EMPLOYEE NUMBER. 4. For each record in the timesheet.txt file, write a record in a new output file named payroll,txt based on the business rules…switch_player(): we will allow the players to choose their own names, but for our purposes, it is easier to think of them as number (0 and 1, for indexing purposes). We will display their names to them on the screen, but in the background, we will keep track of them based on their number. This function should take 1 argument, an integer (either 0 or 1) representing the player and should return the opposite integer (1 if 0 is entered and 0 if 1 is entered). This is a simple function, but it will make our code cleaner later. Use your constants! Using ThonnyUse Python Programming - restaurant reservation program. The application offers different reservation rate for adults and children. (see sample below) RESTAURANT RESERVATION SYSTEMSystem Menua. View all Reservationsb. Make Reservationc. Delete Reservationd. Generate Reporte. Exit 2. When the VIEW RESERVATIONS is clicked, this will display all the reservations made: # Date Time Name Adults Children 1 Nov 10, 2020 10:00 am John Doe 1 1 2 Nov 25, 202011:00 am Michelle Franks 2 1 3 Dec 10, 2020 9:00 am Ella Flich 1 1 4 Dec 21, 2020 12:00 pmDylan Cloze 2 1 3. If the user selects MAKE RESERVATION, the user needs to input the following: a. Name (String)b. Date (String)c. Time (String)d. No of Adults (Integer)e. No of Children (Integer) Note: Adult is 500 per head and Kids is 300 per head reservation, save the data in a text file. 4. If DELETE RESERVATION is selected, the user needs to input the reservation number to remove the existing reservation. 5. If the GENERATE REPORT is clicked,…
- Use Python Programming - restaurant reservation program. The application offers different reservation rate for adults and children. (see sample below) RESTAURANT RESERVATION SYSTEMSystem Menua. View all Reservationsb. Make Reservationc. Delete Reservationd. Generate Reporte. Exit 2. When the VIEW RESERVATIONS is clicked, this will display all the reservations made: # Date Time Name Adults Children 1 Nov 10, 2020 10:00 am John Doe 1 1 2 Nov 25, 202011:00 am Michelle Franks 2 1 3 Dec 10, 2020 9:00 am Ella Flich 1 1 4 Dec 21, 2020 12:00 pmDylan Cloze 2 1 3. If the user selects MAKE RESERVATION, the user needs to input the following: a. Name (String)b. Date (String)c. Time (String)d. No of Adults (Integer)e. No of Children (Integer) Note: Adult is 500 per head and Kids is 300 per head reservation, save the data in a text file. 4. If DELETE RESERVATION is selected, the user needs to input the reservation number to remove the existing reservation. 5. If the GENERATE REPORT is clicked,…Pendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. The flowchart must include a call symbol, at the beginning, to redirect the input to the external data file. create a solution algorithm using pseudocode create a flowchart using RAPTORPendant Publishing edits multi-volume manuscripts for many authors. For each volume, they want a label that contains the author’s name, the title of the work, and a volume number in the form Volume 9 of 9. For example, a set of three volumes requires three labels: Volume 1 of 3, Volume 2 of 3, and Volume 3 of 3. Design an application that reads records that contain an author’s name, the title of the work, and the number of volumes. The application must read the records until eof is encountered and produce enough labels for each work. Design a flowchart and psuedocode Pendant Publishing.
- Fill in the loop table with the correct values, Each row should represent the values of the variables at the line with the comment LOCATION. You don't necessarily need to fill out all of the rows on the provided fable. If you don't fill up the whole table, that isn't necessarily wrong! 1 - 2 a - 10 name - 'AL' while i < 9: if name 'AL': 1: 2 nam AL intinl else: if name < 'NAPOLEON': name - 'NASH elif name < 'NATE': name - 'SAM' else: name- 'AL ' # LOCATIONFile Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type O Tomato O small: $25.00 Thin Crust O Green Pepper Medium: $50.00 Medium Crust O Black Olives O Large: $75.00 Crust Lover O Mushrooms O Family: $130.00 O Extra Cheese O Members Card O Pepperoni Sausage Place Order Your Order Details Print All Orders Is it possible to store each pizza into an ArrayList and then print all the pizzas created when the "Print All Orders" is clicked? For example if user1 Selects a small pizza with the toppings, tomato and pepperoni and a crust type of thin crust. And user2 selects a medium pizza, with toppings, extra cheese and green peppers and a medium crust. How would I place these two orders into an Array List and then print them using the "Print All Orders"?# Create Custom Transformer Create a custom transformer, just as we did in the lecture video entitled "Custom Transformers", that performs two computations: 1. Adds an attribute to the end of the numerical data (i.e. new last column) that is equal to $\frac{x_1^3}{x_5}$ for each observation. In other words, for each instance, you will cube the $x_1$ column and then divide by the $x_5$ column. 2. Drops the entire $x_4$ feature column if the passed function argument `drop_x4` is `True` and doesn't drop the column if `drop_x4` is `False`. (See further instructions below.) You must name your custom transformer class `Assignment4Transformer`. Your class should include an input parameter called `drop_x4` with a default value of `True` that deletes the $x_4$ feature column when its value is `True`, but preserves the $x_4$ feature column when you pass a value of `False`. This transformer will be used in a pipeline. In that pipeline, an imputer will be run *before* this transformer. Keep…