1. Create an array of running totals of reviews for each user. ( 2. Create an array of the number of reviews for each user. 3. Read from the input file into the arrays until there are no more reviews to read. 4. Verify that the provided user ID is between 1 and 20. Skip any that are outside this range. ( 5. Verify that the song rating is between 0 and 100 (inclusive) and skip any rating that is outside that range. (. 6. When the entire file has been read in, display the average rating per user, one per line, with the user ID in a 4-character field and the floating-point average in an 8- character field and two decimal points of precision.
Q: Problem Use the variable x as you write this program. x will represent a positive integer. Write a…
A: 1. Import the 'sys' module2. Extract the first command-line argument as an integer and store it in a…
Q: "Two-level logic" seems confusing. Is it related to the adder system?
A: The logic architecture known as "two-level logic" is characterised by the employment of no more than…
Q: Computer communication systems include six parts. Describe how computer communication system…
A: Computer communication is the process through which two or more devices are able to exchange data,…
Q: Detail the differences between a blog, wiki, and podcast.
A: Any user may create articles in a journal or diary style using a blog. People may leave comments on…
Q: How can autonomic computing help cloud computing?
A: Introduction Cloud computing is the delivery of computing resources such as servers, storage,…
Q: In the context of operating systems, what exactly does it mean to say something is secure?
A: The process of assuring the availability, integrity, and secrecy of an operating system. The term…
Q: What actions must an attacker do for a sniffer attack to be successful? Is it feasible for an…
A: Introduction: Hackers employ sniffers to uncover network weaknesses such as unencrypted data,…
Q: What thread model does Windows 7 utilise (one-one, one-many, or many many)? Where is this on my…
A: Answer: Windows 7 utilizes a one-one thread model, also known as the native threadmodel. In this…
Q: In software development, what's the difference between V&V and V&V? Differentiation was necessary.…
A: What is the V&V? In software project management, software testing, and software engineering,…
Q: Operating systems for multiprogramming, multiprocessing, and distributed processing must be…
A: In an operating system, concurrency is the execution of multiple instruction sequences at the same…
Q: What is the current relevance of access restrictions? Please include a minimum of two examples of…
A: Introduction: Access restriction is a concept that is used to control access to resources. It is the…
Q: Detail what you mean by "cloud computing" and the benefits you'll get by using this method
A: Introduction: Cloud computing refers to the delivery of computing services such as storage,…
Q: How can bridges and routers reduce collision domain?
A: Bridges are a Layer 2 device that divides collision domains by identifying which MAC addresses are…
Q: 3. Describe the pattern of this language and try to name it: S→ SS* | SS+ | a
A: 1) A regular language is a formal language that can be described by a regular expression. A regular…
Q: Provide a working definition of the term "magnetic disc."
A: Magnetic Disk: A magnetic disc is a data storage device that writes, rewrites, and reads data using…
Q: Suppose you're building a great social network. You anticipate half a million users a month after…
A: 1. Searching for Potential Candidates on Social Networks Goldmine: There is no denying the marketing…
Q: Which programme is responsible for loading executable code into the CPU from main memory so that it…
A: The solution for the above given question is given below:
Q: How does C# support “Method Polymorphism”?
A: C# allows for method polymorphism, which means that methods can have different behaviors depending…
Q: elling more vehicles, how might connected-car technology help BMW build long-term customer…
A: Connected-car technology has the potential to significantly enhance the customer experience and…
Q: Linear search has two benefits over binary search for research.
A: Here is your solution -
Q: Create a Google account and prepare an online application for the employment opportunity that has…
A: For the aforementioned possibility to work at Google Pakistan, an online application must be filed.…
Q: Scenario AppInvest is a mobile application that helps people save money and safely invest in a…
A: Please refer to the following step for the complete solution to the problem above.
Q: 12) Determine whether this biconditional is true or false. 5+1=6 if and only if the sky is green.…
A: As per the rules of this bartleby i can only solve 3 subparts.
Q: Can cloud computing benefits be compared? What are cloud computing's drawbacks? Do cloud computing's…
A: Answer is
Q: Discuss how CSS reduces HTML files and simplifies website upkeep.
A: CSS, or Cascading Style Sheets, is a stylesheet language used to define the visual appearance of a…
Q: What exactly are Manufacturing Decision Patterns, and how can one explain them to someone else?
A: - We need to talk about manufacturing decision patterns and how this can be explained to someone…
Q: System designers have long admired conversational sound. Why does rule-based yield more words than…
A: Answer: For the last several decades, formant synthesis, which uses the source-channel model of…
Q: In the software development lifecycle (SDLC), what function does prototyping play?
A: In the software development lifecycle (SDLC), prototyping is a method used to quickly create a…
Q: Is it typical for an organization's intellectual property to have monetary value? Hence, how may…
A: An organization's intellectual property (IP) refers to its intangible assets that are created…
Q: Name the four most common categories of fundamental data.
A: Elementary data items An object that cannot be segmented into smaller components is referred to as a…
Q: Businesses that want to focus on end-user application development face a new set of management…
A: creation of end-user applications: client development Because of the popularity of digital banking,…
Q: Which aggregation operations are allowed for struct variables but not for array variables?
A: Introduction: To construct array variables, first define the array type and then declare or create…
Q: Be as specific as you can in your response to the question below. Can you explain what BCMP is and…
A: Please refer to the following step for the complete solution to the problem above.
Q: Damon Davis produced the Drano Plumbing Company worksheet. He calculated a $50,000 net income. He…
A: Based on the information provided, it seems that Damon Davis is facing a discrepancy between his…
Q: Utilize C++ please! For this assignment, your implementation plan must include at least one class…
A: The C++ code is given below with output screenshot
Q: Explain the idea behind a highly integrated circuit that is used on a very big scale.
A: Giant scale integrated circuit: A large-scale integrated circuit combines millions of Metal Oxide…
Q: QUESTION 4 Which of the following design patterns can be descirbed as a refactori
A: Introduction: Switch statements are often used to select a specific implementation of a class based…
Q: locating and fixing issues with network connections in the healthcare sector
A: A network connection in the health care sector refers to the connectivity of medical devices,…
Q: Define data, information, and database.
A: information technology (IT): Information technology is a broad field that deals with the use of…
Q: How does the project manager make use of the many different apps available for webcams?
A: Project managers Project managers are the people in an organisation who are in charge of planning,…
Q: Explain why it is vital to use public-key cryptography in the development of wireless networks to…
A: Introduction Cryptography: Cryptography is the practice of securing information by converting it…
Q: What goals does authentication serve? Verification methods are examined for their pros and cons.
A: Authentication : This is the process of verifying that someone is who they claim to be. When you log…
Q: What precisely does it mean when you use the delete operator?
A: Operator delete Delete is an operator that can be used to get rid of arrays, non-array objects, or…
Q: Which of cryptanalysis and computer programming did Ada Lovelace engage in?
A: Answer the above question are as follows
Q: What Linux package management systems have you used in the past, or which ones are you contemplating…
A: Package Management for Linux (APT): The acronym APT refers to the open-source software known as the…
Q: 4.19 LAB: Leap year A year in the modern Gregorian Calendar consists of 365 days. In reality, the…
A: Algorithm steps to solve the given problem: Start Read the input year as an integer. If the year is…
Q: Explain source data automation (SDA) and provide at least two (2) benefits of using this technology.…
A: Your answer is given below.
Q: What exactly is the difference between computer fraud and computer crime when it comes to computers
A: Computer crime is also known as cybercrime, which is a crime involving a computer or network.…
Q: How does non-uniform memory access operate in the real world?
A: Form memory access is a configuration element that enables a more thorough functioning of these…
Q: Computer communication systems include six parts. Describe how computer communication system…
A: Introduction: It is feasible for at least two computers, and many more, to interact with each other…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
- write the code to lookup, add and remove phoneentries from the phonebook text file . These are the code we use for the lookup, add and remove in the case statement.(Lookup)# Look someone up in the phone bookgrep $1 phonebook (add)echo "$1 $2" >> phonebooksort -o phonebook phonebook (Remove)grep -v "$1" phonebook > /tmp/phonebookmv /tmp/phonebook phonebook Write a complete Bash script which will accept up to three command-line arguments: the first one is either (lookup, add or remove), the second one is a name enclosed in single quotes and the third one (if doing an add) is a phone number enclosed in single quotes. Using a case statement to match on either lookup, add or remove, the script should then perform the requested operation. Again here, you should first check for null arguments before continuing with the rest of the script or requested operation. In addition, the person may not be in the phonebook for lookup or remove so, you need to account for this.The "-t" flag to "ls" sorts the listing by modification time. Write a BASH line which will write the name of file with the oldest modification time into a file called "lastfile".Create a datafile that contains the first name, last name, gender, age, height, smoking preference, eye color and phone number. Add a variety of records to the file. A sample file looks like:  Write a program that opens the file and reads the records one by one. The program will skip any records where the gender preference is not a match. Of those records that match the gender preference, check to see if the age and height are between the maximum and minum preferences. Then check to see if the smoking preference and eye color are also a match. If at least 3 of the remaining fields match, consider the record a partial match, and print it in the report. If all 4 of the remaining fields match, the record is a perfect match and print it in the report with an asterisk next to it. At the end of the program, close the file and report how many total records there were of the specified gender, how many were a partial match, and how many were a perfect match.
- File 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…Create a js file called cart.js and make a product object for each of the products and store them in a products array when the script loads. Create an empty array to store the items added to the cart. Program the "add to cart button" to take the product id, finds the product object in the products array and adds it to the items added to cart array. Program the "remove from cart button" to take the product id and remove the project object from the items purchased array. Existing code: <!DOCTYPE html><html> <head> <div id="product1" class="card"><img src="img/clorox.jpg"><h1>Clorox</h1><p class="price">$20.00</p><p>Household Cleaner</p><p><button id="product1Btn1">Add to Cart</button></p><p><button id="product1Btn2">Remove from Cart</button></p></div> <div id="product2" class="card"><img src="img/oxiclean.jpg"><h1>Oxiclean</h1><p…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…
- 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.Case Problems - 1- In Chapter 8, you modified the EventDemo program for Carly’s Catering to accept and display data for an array of three Event objects. Now, modify the program to use an array of eight Event objects. Prompt the user to choose an option to sort Events in ascending order by event number, number of guests, or event type. Display the sorted list, and continue to prompt the user for sorting options until the user enters a sentinel value. Save the file as EventDemo.java.Please help create the cpp file. The State class You can allocate 500 as the size for the weeks array. (Please type answer no write by hend)
- Using C# in Microsoft Visual Studio create an application that grades the written portion of the driver’s license exam. The exam has 20 multiple-choice questions. (The correct answers are provided in the screenshot.) the program should store these correct answers in an array. The program should read the student’s answers for each of the 20 questions from a text file and store the answers in another array. (Create your own text file to test the application.) After the student’s answers have been read from the file, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of correctly answered questions, the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly answered questions.We’ve been updating and extending the inventory project to use files and to use arrays. Now it’s time to put it all together. I will give you a file inventory.txt File Contents: Red delicious apples 1.00 25 6 8 10 Assorted bouquets 4.00 50 10 10 0 Camembert cheese 2.00 25 10 12 4 END The file will have the following specifications: Each record consists of two lines. The first line contains the name of the product, which may be more than one word long. The second line contains the wholesale price as a decimal, the markup as a percentage, and three quantities, for counter, shelf, and warehouse. If the first line of a record contains the word END all by itself, that is the end of the file. Your task is to read each record into the program, as a string for the name, and numbers for the price and markup, and as an array of numbers for the quantities. Then calculate the total profit for each item: (wholesale price) * (markup, converted into a decimal) * (total quantity). Print out a report…Python - Next Birthdate In this task, we will write a program that reads birthdate data from a given CSV file, and given the current date, determines which person's birthday will be celebrated next. Create a function with the following signature: nextBirthdate(filename, date) filename: parameter, which represents the CSV filename. date: parameter, which represents the current date. The function should open the CSV file, read the birthdate data, and determine which person's birthday will be celebrated next, given the current date. The name of the person should be returned. In other words, given a date, find the person whose birthday is next. Sample Run birthdates.csv Draven Brock, 01/21/1952 Easton Mclean, 09/02/1954 Destiny Pacheco, 10/10/1958 Ariella Wood, 12/20/1961 Keely Sanders, 08/03/1985 Bryan Sloan,04/06/1986 Shannon Brewer, 05/11/1986 Julianne Farrell,01/29/2000 Makhi Weeks, 03/20/2000 Lucian Fields, 08/02/2018 Function Call nextBirthdate("birthdates.csv", "01/01/2022") Output…