"### Exercise 2 Working with a file and numbers ###\n", "\n", "The file grades.txt has the grade for the quizzes computed for students in a classroom. Your work is to open the file and compute the average grade in quizzes for each student. the average is above 7.5 give the student 0.5 of bonus in the average but notice that the grade can not be above 10. The solution for this problem is presented below: \n", "[2.0, 6.33, 6.22, 5.7, 7.01]\n",
Q: What characteristics define an effective back-up plan? The process of backing up your desktop…
A: Please find the detailed answer in the following steps.
Q: the output of the following expressions: System.out.println(17.0 / 4); 14. The Java compiler…
A: 13. Write the output of the following expressions: System.out.println(17.0 / 4);
Q: Identify what is being asked. Write your answer on a clean sheet of paper. ______________ 1. This is…
A: The answers related to the lines have been solved in subsequent steps.
Q: Solve the following Initial Value Problem (IVP): y " + 3y y(0)=1 and y (0)=2 Find the Fourier Series…
A: solutions in below step
Q: Question 1 Not yet answered Marked out of 1.00 A computer system has a word addressable memory. Each…
A:
Q: Make a distinction between a cold boot and a warm boot.Make a distinction between a cold boot and a…
A: When to Use Boot or Booting: It is a procedure that prepares the computer to function for the user…
Q: Describe in great detail cookies, including at least four different kinds of cookies, as well as…
A: The following contains information about cookies and how they affect internet security. Cookies:-…
Q: 1. Algorithm analysis (Ex.2.2-6) a. Prove that every polynomial of degree k, p(n)= an* + ak-in² +. +…
A: a. Given polynomial is, p(n)=aknk+ak-1nk-1+......+a0 where ak>0 In this polynomial, ak,…
Q: What exactly is a global constant? Is it legal in a programme to utilise global constants?
A: Given: We have to discuss What exactly is a global constant. Is it legal in a programme to utilise…
Q: What are the main ways you should use if you want the computer to look for operating system boot…
A: When a computer is switched on, its operating system begins booting. It is the first sequence of…
Q: What kind of connection does a piece of data have to an Internet of Things device?
A: Given: we have to discuss What kind of connection does a piece of data have to an Internet of…
Q: What are the repercussions of a cloud security breach? What are some of the possible countermeasures…
A: Given: A data breach occurs when sensitive information is exposed to an unauthorised third party.…
Q: This software system will be built to function in a fast-paced setting. Furthermore, computational…
A: By utilizing architectural style, the application server may be installed on several computers,…
Q: Finish the method called printUniqueNumbers() that will take anint [] and print out all of the…
A: So, first and foremost, we'll learn what an array is and how to define one in Java. Later, we'll…
Q: Conduct research on the most effective methods for backing up cloud data. Explain in further detail…
A: Cloud data backup: It is becoming more common to back up one's data using a method known as cloud…
Q: Consider each component of a backup plan. What distinguishes a mobile backup plan from a plan for a…
A: Introduction With time, data saved in an operating system may get lost or damaged. It is essential…
Q: What are the benefits and drawbacks of utilising IPSec in comparison to other methods of network…
A: IPsec, which stands for "Internet Protocol Security," is a collection of protocols that was…
Q: Make a distinction between a cold boot and a warm boot
A: Booting is a process of starting a computer which involves all startup process where all the…
Q: F) Create 3x5 matrix named MA and then eliminate all the rows of columns 2 through 4.
A: Create 3x5 matrix named MA and then eliminate all the rows of columns 2 through 4.
Q: By following certain safety measures, you can protect your computer from power surges; but, are…
A: Given: First and foremost, what what is meant by the term "power surge"? A temporary increase in the…
Q: You have to 2 ints from the user( a and b) & print their sum on the console. However, sums in the…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: The Real-Time Operating System (RTOS) is crucial to the operation of the Internet of Things (IoT).
A: RTOS defines the real time task processing time, interrupt latency, and longer period reliability of…
Q: Write a function main() and implement each math operations defined above. Design a basic calculator…
A: Check for condition in case of subtraction and division and in other cases we can proceed normally
Q: Give a quick history lesson on how wireless LAN standards have developed
A: Answer:
Q: It is necessary to have an in-depth discussion on cookies, specifically at least two distinct types…
A: Cookies:- Cookies are text files containing little bits of data like a username and password that…
Q: What are the many different elements that need to be taken into account while building a compiler…
A: The following steps will lead you to the answer: Instructional Guidelines CollectionSpecific…
Q: Define a Recursive Function that will display the reverse of the number [test data are provided].…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: What are some of the reasons why the adoption of protocols is required for computer communication?…
A: Given: Because it is vital for the receiver to understand the sender, protocols are necessary.…
Q: Q3: By using MATLAB. Answer the following A) Solve the following system: x+y=1 x-y+z=0 x+y+z=2
A: Find the required code in matlab given as below and output : As per company guidelines we are…
Q: "forward lookup zone" of a DNS and what does it do
A: Given : What precisely is the "forward lookup zone" of a DNS and what does it do?
Q: What is the cause of high attenuation at 1310 and 1550 nm? O trapped oxy-hydrogen or hydroxyl ions…
A: Option A ) trapped oxy-hydrogen or hydroxyl ions in the core
Q: Given a Network Address of 172.16.10.0/21, subnet this address so that each Subnet can cater for 505…
A: Answer How do you make a subnet mask out of hosts and subnets? Step 1: Determine the host…
Q: It's important to tell users how they can defend themselves against session hijacking attacks.…
A: Session hijacking- This occur when intruders takes the user internet session. For instance, when…
Q: What are some of the most important benefits and drawbacks of storing data on the cloud?
A: Intro Cloud-Based Data Storage is essentially a data storage mechanism based on the architecture of…
Q: c++ program I NEED TO INSERT STRING IN BST AND OUTPUT IN INORDER PREORDER POSORDER i have code…
A: Inserting a value in the correct position is similar to searching in that we try to follow the rule…
Q: Which term describes the statistical deviation of the actual number of arriving photons from the…
A: In measurements and science, the deviation is an action that is utilized to track down the…
Q: 19-The MSB in the 20 bits of physical address specifies the segment. Select one: C True False
A: Given question are true or false based question.
Q: What are the advantages of using ITIL4 for a business?
A: Answer: ITIL provides a clear focus on total cost of ownership (TCO), so you can reduce the often…
Q: An adversary makes use of a MAC in an effort to modify both the Tag (the ciphertext) and the MAC…
A: Given: The solution to the above question is as follows. MAC is the abbreviation for the tag. It's a…
Q: What are some of the benefits that come along with utilising the Collection Framework that Java…
A: The following are some of the benefits of using the Java Collections Framework: It Reduces the…
Q: A GUI program has the following design: ENTER COUNT: Single COUNT 1: TIME: COUNT 2: TIME: COUNT 3:…
A: The program has three components: a java.awt.Label "Counter";a non-editable java.awt.TextField to…
Q: What do cloud users get? Hacking, software vulnerabilities, pricing, and downtime are challenges…
A: Cloud Infrastructure Cloud computing is the provision of computer services such as servers, storage,…
Q: Is a MAC (message authentication code) capable of modifying the Tag and the ciphertext while they…
A: According to the information given:- We have to define MAC (message authentication code) capable of…
Q: Use a stack and node(ij) notation (and j denotes order nodes are placed onto and removed from stack,…
A:
Q: Create a code (that is both effective and efficient) that asks the user to enter a sales amount. The…
A: code : - # get the amount from user amount = int(input("Enter amount: ")) # set discount amount…
Q: Describe the dangers of buying software for installation on desktop computers' hard drives. What…
A: Because they have specialized IT employees on staff, businesses that buy and install application…
Q: Write a Java program to calculate the average value of array elements.
A: The numArray variable in the below programme stores the floating-point values whose average is to…
Q: An intrusion into the network might have been caused by malicious traffic that was routed from one…
A: VLAN: VLAN hopping, also known as virtual LAN hopping, is an attack on a network that occurs when…
Q: Who played a key role in the development of computer software, and how did they impact the…
A: A developer, also known as a programmer or software engineer, is an IT professional who uses…
Q: in java.Create a class named Customer that will determine the monthly repayment amount due by a…
A: Answer: CODE: Java Programming Language // Customer.java import javax.swing.JOptionPane;public class…
python
Step by step
Solved in 4 steps with 2 images
- The average amount Sold function is not run as expect. Please fix it. The input file: sales.txt header in picture. It is over 5000 char. I can't copy. 13492785 2017 Jane North; 1000 78534520 2012 Tim South; 95020192756 2017 Linda East; 15000 19273458 2012 Paul West; 500078520192 2017 Mary Jane Doe; 5001 32278520 2012 Victor Smith; 799514278520 2012 Mary Johnson; 12056192785 2017 Tom Baker; 1300 88278529 2012 Diana Newman; 150089278527 2012 William Peterson; 1420098278528 2012 Jim Gaddis; 120099192785 2017 Laura King; 1000 43278524 2012 Ann McDonald; 2000 The output expect: in picture. #include "Sales.h"#include <iostream>#include <sstream>#include <iomanip>#include <fstream>#include <string>using namespace std; const int MAX_SIZE = 30; void readData(string fileName, Sales salesArr[], int n);double calcSalesAvg(Sales salesArr[], int n);void displayOverAvg(Sales salesArr[], int n, double avg);void writeReport(Sales salesArr[], int n, string…The Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient's first and last name, home address, and birth year. The records are sorted in ascending birth year order. Write a program so that display a count of the number of patients born each year John Hanson, 23 Elm, 1927Mary Locust, 476 Maple, 1950Susan Monroe, 512 Peachtree, 1957Carol Fortune, 2819 Locust, 1960James Fortune, 2819 Locust, 1963Lawrence Fish, 12 Elm, 1968Janice Weiss, 234 Birch, 1971Henry Garza, 199 Second, 1973Kimberly Swanson, 310 Appletree, 1980Louis Claude, 2716 Third, 1981Jill Fox, 12 Oak, 1985Opal Reynolds, 78 County Line, 1987Francis Dumas, 67 Fourth, 1992Madison Conroy, 23 Fifth, 1996Daniel Moy, 100 Sunset, 1987File 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…
- Problem Definition Task. Your task is to develop a python program that reads input from text file and finds if the alphanumeric sequence in each line of the provided input file is valid for Omani car license plate. The rules for valid sequences for car plates in Oman are as follows: Each sequence is composed of 1 to 5 digits followed by one or two letters. Digits cannot start with 0, for instance, 00, 011, or 09 are not valid digit sequences. The following list are the only valid letter combinations: ['A','AA','AB','AD','AR','AM','AW",'AY"', 'B', BA','BB','BD',"BR','BM',"BW',"BY', 'D','DA','DD','DR','DW','DY', 'R','RA','RR','RM','RW','RY', 'S','SS', 'M','MA','MB','MM','MW','MY", "W',"WA',WB',"wW', Y,YA','YB','YD','YR','YW',YY] Program Input/Output. Your program should read input from a file named plates.txt and write lines with valid sequences to a file named valid.txt. Any line from the input file containing invalid sequence should be written to a file named invalid.txt. Each line…"### Exercise 2 Working with a file and numbers ###\n", "\n", "The file grades.txt has the grade for the quizzes computed for students in a classroom. Your work is to open the file and compute the average grade in quizzes for each student. If the average is above 7.5 give the student 0.5 of bonus in the average but notice that the grade can not be above 10. The solution for this problem is presented below: \n", "[2.0, 6.33, 6.22, 5.7, 7.01]\n", ] }, "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [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…
- The function print_last_line in python takes one parameter, fname, the name of a text file. The function should open the file for reading, read the lines of the file until it reaches the end, print out the last line in the file, report the number of lines contained in the file, and close the file. Hint: Use a for loop to iterate over the lines and accumulate the count. For example: Test Result print_last_line("wordlist1.txt") maudlin The file has 5 lines.General Output Find Results 6. Filename: TriangleProblem_FamilyName If a, b and e represcent the three sides of a triangle, then the arca of the triangle is: A = /s + (s – a) + (s – b) * (s – c where: s = “tb+c Also the radius of the largest inscribed circle is given by: r_insc = 4 and the radius of the smallest circumscribed circle is: r_circ =- 2.0 a•b•c 4*A circ _inse Inscribed Circle Circumscribed CircleTime Write a Python script that extracts and prints a single record from an input file in which organized by line. Each line contains the name of a person (possibly containing multiple followed by the year of his birth. Abbas ibn Firnas ibn Wirda: 809 Muhammad ibn Musa al - Khwarizmi: 780 Abu Al - Walid Muhammad Ibn Ahmad Rushd: 1126 The program uses function extract DataRecord with the specification: @param infile the input text file object @return pants a list containing the name (string) in the first element and the year of bir the second element. If the end of file was reached, an empty list is returned
- program by using "C language" my student number is :1910206534 The information of all students taking the programming course is kept in a random access file with the struct given below. Your code should swap the information of two records in the file. Write the code that performs this operation. Note: The position of the 2 records that you need to swap like this:The position of the first record is the sum of the first 5 digits of your student number.The position of the second record is the sum of the last 5 digits of your student number.Edit the isPrime function so that it returns False when any number less than 3 is passed (including negative numbers). Then write a function called nPrimes that accepts an integer parameter called n and then prints the first n prime numbers. Start looking for prime numbers at 3, and keep looking until you find n of them. Your nPrimes function should use the isPrime function to determine if a number is prime. Both of these functions should be placed in a file called NPrimes.py. Here is a sample run of the completed program: Enter the number of primes you want to find: 10 3 5 7 11 13 17 19 23 29 31 from NPrimes import nPrimesdef main(): n = int(input("Enter the number of primes you want to find: \n")) nPrimes(n) main() def isPrime(num): prime = True for x in range(2, num): if num % x == 0: prime = False break return prime;Write a program to implement the algorithm that you designed in Exercise 20 of Chapter 1. (Assume that the account balance is stored in the file Ch4_Ex15_Data.txt.) Instructions to Exercise 20 of Chapter 1 have been posted below for your convenience. Exercise 20 An ATM allows a customer to withdraw a maximum of $500 per day. If a customer withdraws more than $300, the service charge is 4% of the amount over $300. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient funds and gives the customer the option to withdraw the money for a service charge of $25.00. If there is no money in the account or if the account balance is negative, the ATM does not allow the customer to withdraw any money. If the amount to be withdrawn is greater than $500, the ATM informs the customer about the maximum amount that can be withdrawn. Write an algorithm that allows the customer to enter the amount to be withdrawn. The algorithm then checks the…