If you have downloaded this book's source code (the companion Web site is available at www.pearsonhighered.com/gaddis), you will find the following files in the Chap- ter 07 folder: • GirINames.txt – This file contains a list of the 200 most popular names given to girls born in the United States for the years 2000 through 2009. • BoyNames.txt – This file contains a list of the 200 most popular names given to boys born in the United States for the years 2000 through 2009. Write a program that reads the contents of the two files into two separate arrays, or ArrayLists. The user should be able to enter a boy's name, a girl's name, or both, and the application will display messages indicating whether the names were among the
Q: The attached file, CommonFemaleNames.txt, contains the top 1000 female names in the United States.…
A: The answer given as below:
Q: .Write code for below problem. The input below is just an example and you should implement…
A: Given: We have to write a C++ program in the given statements of the above questions.
Q: You need to create a report using the pictureFrame.txt sequential access file. The report should…
A: b. declare a StreamReader variable for the input file
Q: please can this code be converted to c++ or Java. Thank you Code is as follows: location = []…
A: I am converting this python code to c++. In step 2, you will get C++ code.
Q: How many bytes does creating this template reserve in memory? Struct phone{ char brand[51];…
A: Structures in C/C++: A structure allows the user to define a type that contains one or more fields…
Q: integer stringwhere the integeris the popularity number (1 is most popular) and stringis a female…
A: CommonFemaleNames.txt:1 EMMA2 OLIVIA3 SOPHIA4 AVA5 ISABELLA6 MIA7 CHARLOTTE8 AMELIA9 MADISON10…
Q: Given the "Document" class below, you will write a basic version of Google Drive. Your program will…
A: import java.util.*;import java.lang.*;import java.io.*; class Document{ String document_name; String…
Q: If you have downloaded this book's source code (the companion Web site is available at…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Modify songVerse to play "The Name Game" (see OxfordDictionaries.com), by replacing "(Name)" with…
A: Your solution is here with an Output .
Q: .Create an interesting educational information chat box that asks the user to give an input question…
A: Program: import random print("QnA ChatBox\n") choice=int(input("\n\t 1. What is Python? \n\n\t 2.…
Q: Now do it the fixed sliding window of building a tri-gram dictionary method. You can start after 256…
A: First and foremost Question: what is trigram? A three-part graphic unit is known as a trigraph.…
Q: Write programs to do the 2 variations on the Bubble Sort. Comment the first variation completely.…
A: NOTE: - Both variations of Bubble Sort are explained and implemented in python 3 in the next steps.…
Q: JavaScript Loops Create an HTML document called assignment2.html that implements a webpage that…
A: Lets see the solution.
Q: Can you explain this code step by step in a detail way?
A: Use an array of structures to represent multiple names
Q: For this interactive assignment, you will create an application that grades the written portion of…
A: Because of indentation problem in python i attached screen shots of program for better…
Q: Create a program with a menu that allows the user to do the following: ============ Frequently Asked…
A: As the programming language is not mentioned here we are using PYTHON The code is given below with…
Q: In the Chap07 folder of the Student Sample Programs, you will find a file named ChargeAccounts.txt.…
A: As the programming language is not mentioned here, we are using JAVA The code is given below with…
Q: File Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type O Tomato O small: $25.00…
A:
Q: You will need the two files attached to this note: GirlNames.txt and BoyNames.txt. GirlNames.txt…
A: Please save all the data in the same location
Q: R-Studio 1.) You have an "movie votes.csv" file that contains 4392 movies, each row has a movie…
A: Answer: I have given answered in the handwritten format
Q: Hello, C++ programming The source code starter file is included as an attachment The file…
A: According to the information given:- We have to follow the information in order to get desired out…
Q: Write a small application to maintain contact information about people. For each person in your…
A: used to create computer programs. An example program of C++ is : #include <iostream> using…
Q: What can I fix about this code to program it to display ONLY duplicates instead of with…
A: using System;using System.collections.Generic;using System.Linq;using System.Threading.Tasks. public…
Q: In this lab, you will read two files. Firstly, the ‘AccountData.csv’ file has the name and account…
A: Given In this lab, you will read two files. Firstly, the ‘AccountData.csv’ file has the name and…
Q: • Your solution to this lab problem should be uploaded to the Lab Problem 8 dropbox on the course…
A: Algorithm: Start Read the values of 1st 3-dimensional vector in an array Read the values of 2nd…
Q: wn file in Rstudios For all questions you should load tidyverse and nycflights13. You should not…
A: (1.) Load the dataset and print first few rows:…
Q: CSC 1302: PRINCIPLES OF COMPUTER SCIENCE II Lab 7 How to Submit Please submit your java source files…
A: Given: CSC 1302: PRINCIPLES OF COMPUTER SCIENCE II Lab 7How to Submit Please submit your java source…
Q: A list named parking_tickets has been defined to be the number of parking tickets given out by the…
A: The code is written below: # lets create and initialize a list with only 5 values for the…
Q: If you have downloaded the source code from this book’s companion Web site, you will find a file…
A: Code: f = open('USPopulation.txt', 'r') data = f.readlines() max_diff = float('-inf')min_diff =…
Q: The file point2d search hint.cpp reads in a file named point2d.csv containing two commaseparated…
A: #include <string> #include <fstream> #include <iostream> #include <cmath>…
Q: ***Please write code suitable for Myprogramminglab below: If you have downloaded the source code…
A: Introduction ***Please write code suitable for Myprogramminglab below: If you have downloaded the…
Q: Create a COVID-19 support service application using Python named CovidSupportSystem that will…
A: Use an infinite loop to accept input choice from user till user wishes to quit and perform…
Q: nycflights13 For this assignment, you must name your R file nycflights13.R *****use Rmarkdown file…
A: The answer is written in step 2
Q: The local driver's license office has asked you to create an application that grades the writ- ten…
A: According to the information given:- We have to follow the instruction to conduct the local driver's…
Q: Use the Active Code window below to create 4 parallel arrays and intialize them using initialization…
A: Answer is given below .
Q: Display the first name and salary*10000 of all employees who works for department 50. Handle…
A: declarecursor c isselect first_name, last_name, department_idfrom employeeswhere to_char(hire_date,…
Q: Which among the following loops can be used to display the elements of an associative array? O a.…
A: Answer : the given MCQ answer is option D) foreach loop foreach loop is used to read the element…
Q: R-Studio 1.) You have an airport routes.csv file that contains 3409 airports, each row has a…
A: Answer: Our instruction is answer the first three part from the first part and . I have given…
Q: • Create an empty list of courses. • Prompt the user for a course they wish to enter, or to type…
A: Algorithm: Start Implement a method named display() that takes a list of courses as argument…
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: My code below. I am getting an error when trying to create my adjacency matrix. i dont know what i…
A: def readMatrix(inputfilename): ''' Returns a two-dimentional array created from the data in the…
Q: Create and save a csv file that contains names and ages, separated by commas. Write a program that…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: how to run this code Public Class Form1 ''Double click the form and write below code Private…
A: Create a project: Open visual studio. Create a new project by selecting a visual basic Windows…
Q: 2. In the attached file, you will find the oil production for all countries that produce more than…
A: clcclear allclose…
Q: The attached file USPopulation,txt contains the US population in thousands, during the years 1950…
A: Pseudocode: Initiate the Main function Declare variables we are gonna use and initiate the list.…
Q: 7. World Series Winners In this chapter's source code folder (available on the Computer Science…
A: Step 1 : Start Step 2 : Open the WorldSeriesWinners.txt file in read mode. Step 3 : Declaring the…
Q: The attached file, CommonFemaleNames.txt, contains the top 1000 female names in the United States.…
A: Solution :: CommonFemaleNames.txt: 1 EMMA 2 OLIVIA 3 SOPHIA 4 AVA 5 ISABELLA 6 MIA 7…
Q: Assume the following method is in class TestSLList (a method outside the SingleLinked List class).…
A: PLEASE DO SUPPORT FOR MY EFFORTS THANKS! ANSWER: this code removes all occurrences of the item…
Q: Q3d: value_counts() Using the value_counts() method, determine how many different possible values…
A: Code Approach: Import libraries to use methods. Create list of lists and store in a variable.…
java
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Python Programming Assignment: Create a dictionary that takes a basketball team's information (that includes team's name and points) as parameter, creates a teams_dict and returns it. Also, create a parameter for write_file parameter that opens current results text file in write mode and writes the dictionary information to file as per format and closes the file.Chapter 7 - Programming Challenge 15 15. World Series Champions If you have downloaded this book’s source code (the companion Web site is available at www.pearsonhighered.com/gaddis), you will find a file named WorldSeriesWinners.txt. This file contains a chronological list of the winning teams in the World Series from 1903 through 2009. (The first line in the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2009. Note that the World Series was not played in 1904 or 1994, so those years are skipped in the file.) Write a program that lets the user enter the name of a team, and then displays the number of times that team has won the World Series in the time period from 1903 through 2009. Tip: Read the contents of the WorldSeriesWinners.txt file into an ArrayList. When the user enters the name of a team, the program should step through the ArrayList, counting the number of times the selected team appears You only need to submit the…The names and student numbers of students are save in a text file called stnumbers.txt. Example of the content of the text file: Peterson 20570856 Johnson 12345678 Suku 87654321 Westley 12345678 Venter 87654321 Mokoena 79012400 Makubela 29813360 Botha 30489059 Bradley 30350069 Manana 30530679 Shabalala 28863496 Smith 87873909 Nilsson 30989698 Makwela 30256607 Govender 30048117 Ntumba 30598303 Ramsamy 29952239 Skosana 29982995 Jameson 30228484 Xulu 29092248 Wasserman 27469352 Bester 28615425 Babane 27154033 Maboya 29897890 Mahlangu 30031338 Majavu 30165970 Myene 30954177 Motaung 30907276 Ramaroka 30804507 Radebe 30007674 Sekake 30017416 Zwane 30038227 Shuro 30238072 Viljoen 28881389 Sithole 45688555 Write a function called displayData() to receive the array and number of elements as parameters and display the names and student numbers of the students with a heading and neatly spaced. Write a function, isValid(), which receives a number as parameter and determines whether the number…
- Average Number of WordsIf you have downloaded the source code from the Computer Science Portal you will find a filenamed text.txt in the Chapter 08 folder. The text that is in the file is stored as one sentenceper line. Write a program that reads the file’s contents and calculates the average number ofwords per sentence.(You can access the Computer Science Portal at www.pearsonhighered.com/gaddis.)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)Finish this program from the code posted below! Note: There should be two files Main.py and Contact.py You will implement the edit_contact function. In the function, do the following: Ask the user to enter the name of the contact they want to edit. If the contact exists, in a loop, give them the following choices Remove one of the phone numbers from that Contact. Add a phone number to that Contact. Change that Contact's email address. Change that Contact's name (if they do this, you will have to remove the key/value pair from the dictionary and re-add it, since the key is the contact’s name. Use the dictionary's pop method for this!) Stop editing the Contact Once the user is finished making changes to the Contact, the function should return. Code:from Contact import Contactimport pickledef load_contacts():""" Unpickle the data on mydata.dat and save it to a dictionaryReturn an empty dictionary if the file doesn't exist """try:with open("mydata.dat", 'rb') as file:return…
- In the attached city list.txt file, the names of the provinces in Turkey are given in a single line according to the format given in Figure 1. In the application you will write, write the city names read from this file into the license plate list.txt file in the format shown in Figure 2. In more descriptive terms, citylist.txt is a file given to you. license plate list.txt is the file you will get with your code. city list: Adana, Adıyaman, Afyon, Ağrı, Amasya, Ankara, Antalya, Artvin, Aydın, Balıkesir, Bilecik, Bingöl, Bitlis, Bolu, Burdur, Bursa, Çanakkale, Çankırı, Çorum, Denizli, Diyarbakır, Edirne, Elazığ, Erzincan, Erzurum, Eskişehir, Gaziantep, Giresun, Gümüşhane, Hakkari, Hatay, Isparta, İçel (Mersin), İstanbul, İzmir, Kars, Kastamonu, Kayseri, Kırklareli, Kırşehir, Kocaeli, Konya, Kütahya, Malatya, Manisa, Kahramanmaraş, Mardin, Muğla, Muş, Nevşehir, Niğde, Ordu, Rize, Sakarya, Samsun, Siirt, Sinop, Sivas, Tekirdağ, Tokat, Trabzon, Tunceli, Şanlıurfa, Uşak, Van, Yozgat,…5. Charge Account Validation If you have downloaded the source code from the Computer Science Portal you will find a file named charge_accounts.txt in the Chapter 07 folder. This file has a list of a com- pany's valid charge account numbers. Each account number is a seven-digit number, such as 5658845. Programming Exercises 403 program Write a program that reads the contents of the file into a list. The program should then ask the user to enter a charge account number. The program should determine whether the number is valid by searching for it in the list. If the number is in the list, the should display a message indicating the number is valid. If the number is not in the list, the program should display a message indicating the number is invalid. (You can access the#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-----------------
- The attached file USPopulation,txt contains the US population in thousands, during the years 1950 through 1990. The first line in the file contains the population for 1950, the second line contains the population for 1951, and so forth. Write a program that reads the file's contents into a list. The program should display the following data: the average annual growth in population during the time period the year with the greatest increase in population during the time period (highest growth rate) the year with the smallest increase in population during the time period (smallest growth rate) 151868 153982 156393 158956 161884 165069 168088 171187 174149 177135 179979 182992 185771 188483 191141 193526 195576 197457 199399 201385 203984 206827 209284 211357 213342 215465 217563 219760 222095 224567 227225 229466 231664 233792 235825 237924 240133 242289 244499 246819 249623File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below. You will provide the functions that allow us to determine: if a chessboard square is either black or white, given its coordinates. If the row/column is valid or not for the standard chessboard For example, if we pass in “d” for the column and 4 for the row, your function that determines color should return the string: “BLACK”. If we pass in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: Your function for validating the column should be able to accept upper or lowercase strings as parameters. Your functions for validating the row should be able to accept integers or strings as parameters. Your function that determines black-or-white may assume that the input has been validated prior to us calling…Submission: Combine the code files for Q1 and Q2 as a zip file and submit in Moodle Question 1: Write a Program that to enter Student Name, Grade and print it to the screen with below requirements . . . . Asks the users how many student grades they want to enter. Based on that number the program should setup a loop to ask the user to enter student name and the student grade. Save this information using 2 arrays At the end the program must show the student names and grades with 1 student on each line on the screen Program should use Arrays and loops to achieve the task.