Write a program that prompts for a file name, then opens that file and reads through the file DNSList.txt, looking for lines of the form: Location: France Count the number of DSN server from each country. Once you have accumulated the counts for each name, print out the counts, sorted by name. For example, enter a file name “DNSList.txt" or leave it blank and match the output below. Enter file:DNSList.txt DNS server list: Country Count Brazil 1 France 6 India 1 United
Q: N (-1)" 7=4 1)" 2n +1 n=0
A: Given series as,
Q: Outsourcing should be explained.
A: Intro the above question is about Outsourcing should be explained.
Q: Illustrate the application of generalization and specialization principles to identify super class a...
A: In ER model concept, Generalization and Specialization are utilized for information reflection in wh...
Q: 9. Write an assembly code to implement the following function on ARM architecture. 2n * R2 A =
A: Input : Input R Input b Output : Value of A
Q: Question 2 1- Add the following (98A8)h + (A8B9)h 2- Using First complement, Find (621)o - (211)h 3-...
A: As per our policy we can only solve first three sub questions , Please post other questions separate...
Q: Evaluate each binary question and determine which one is out of sequence 9. 1010 in binary is ____ ...
A: answer is
Q: What would cause the current instruction to be reset if there was a problem?
A: Introduction: A page fault is a term used to describe memory pages, and when a user requests that th...
Q: Create a function that removes the correct members from the input. Use the following examples to unl...
A: Algorithm: Firstly we will take the string as an function arguments then we will split the string w...
Q: Which of the following is the correct way to perform matrix multiplication between matrices x and y?...
A: Please upvote me please I am providing you the answers to your questions. Answer 6) dot(x,y) ...
Q: Differentiate between the different types of object classes?
A: Object classes are used to indicate what type of object is represented by an entry and to specify th...
Q: Write a program in HACK assembly, without using symbols, that computes the bitwise exclusive or (XOR...
A: Lets see the solution in the next steps
Q: What exactly is the connection between datasets and information literacy?
A: Introduction: Datasets and information literacy: a link
Q: H.W Find the Adjoint to the following matrix -2 Y = 1 4 5 1 3. 2.
A: Here, we are going to find out adjoint matrix for the given 3x3 matrix.
Q: Create a task that takes a series of words and returns the highest score of goals. Each letter of th...
A: Algorithm: Firstly we will take the input form the user or some fix string Then we will run a ragex ...
Q: Discuss the significance of MAR and MDR in the context of interruptions.
A: Intro the above question is about significance of MAR and MDR in the context of interruptions
Q: What is the theta notation of f (n) +g (n)? f (n) = 0 (1) 9 (n) = e (n') O (n²) e (n) O 0 (n) O e (n...
A: Given theta functions are f(n) = Theta(1) g(n) = Theta(n²)
Q: What is the definition of a base class access specification?
A: Intro the above question is about What is the definition of a base class access specification ...
Q: Create a function that takes a mathematical expression in prefix notation as a string and evaluates ...
A: Algorithm EVALUATE_PREFIX(STRING) Step 1: Put a pointer P at the end of the end Step 2: If characte...
Q: What are the key differences between services and software components?
A: Intro the above question is about differences between services and software components
Q: urve, you can guess, 2 or 3 different numbers of clusters, depending on how the elbow bends ( the sh...
A: Given as,
Q: What is the significance of kernel mode in operating systems?
A: Introduction: User mode and kernel mode are the two operating system modes.
Q: 2. Write a JAVA program to input 2 strings, s1, and s2, return a new string made of the first char o...
A: The Java code along with the snapshot of code and output is given below:
Q: What does it mean to have a handshaking protocol?
A: Here the term handshaking refers to computer handshaking.
Q: ### Problem 1 Consider the following algorithm to check connectivity of a graph defined by its adjac...
A: Note- As per the Bartleby process we have to attempt only one question. Functioning: The algorith...
Q: H.W Find the Adjoint to the following matrix 0.5 0.2 -0.1 X = 0.9 0.7 -0.6 -0.4 -1
A: Here in this question we have asked to find adjoint of the given matrix.
Q: JOY is a CS (B.TECH) student and now has days she wants to work on marketing. AND you are trying to ...
A: Used to perform large tasks (think thousands or millions of records!) That will exceed the normal pr...
Q: G) 15th Complement for (115)o H) 8th Complement for (96)h
A: G) Given number is, (115)o That means 115 is a octal number. The equivalent Hexadecimal number for 1...
Q: Describe the fundamental structures in an operating system that govern file organisation.
A: Here we are required to explain the fundamental structures in an operating system that govern file o...
Q: PYTHON PROGRAMMING!! EXTRA CONSTRAINT: MAKE SURE THAT THE CODE ACCEPTS THE INPUT ON THE IMAGE AND O...
A: as per requirement i use PYTHON language to solve the problem... arrow_forwardcopy to code: #python ...
Q: Create a structure to hold 100 students' roll numbers, scores, names, ages, and addresses. Another u...
A: Introduction: Approach: Here, the array of the Student structure is created to store information of ...
Q: A method defined within a class and whose header does NOT include the static modifier is known as wh...
A: A class is a collection of methods and members and there are various types of methods and let's expl...
Q: What exactly are CASE tools? What exactly is a CASE repository, and how does it work?
A: Intro the above question is about what exactly are CASE tools What exactly is a CASE repository, and...
Q: What are the prerequisites and/or steps that must be completed in order to develop a proof of concep...
A: 5 Steps to a Proof of Concept for Successful Software Development.
Q: Describe the life cycle of information systems development (SDLC).
A: INTRO the above question is about SDLC system development life cycle.
Q: 5 Please convert the following C/C++ function to RISC-V assembly (RV321).
A: Swap -> void swap(int v[], int k) { int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Cover...
Q: 1) What is the difference between the status and control flags? What are the status flags for the AE...
A: As per our policy, "Since you have asked multiple questions, we will solve the first question for yo...
Q: Please do not use "def" or "display" and use only input/output, conditionals (if, elif, else) and it...
A: we will write a program in Python to check whether the input number is prime or not and it is multip...
Q: Computer science Discuss the importance of testability and provide an overview of the compiler.
A: Introduction: Testability Suggestions The whole testability advice is as follows: 1. Make use of eup...
Q: What are the advantages of better customer service?
A: Customer service- It is the services provided by a product seller to the customer during the entire ...
Q: (p q) v (p r) is logically equivalent to 2020 a.p- (q v r) b. p v (q A r) c.pA (q v r) d. p - (q Ar)
A: Here, we are going to check logically equivalent statement for the given logic statement. We can che...
Q: Packets are sent and received by internet service providers. These packets contain the communication...
A: INTRODUCTION: Internet service providers use packets to send and receive data. These packets contain...
Q: the Email application
A: Structure of an email Email contents classified as two, the header and the body. The Header ...
Q: What exactly is the NetBeans IDE?
A: Given :- What exactly is the NetBeans IDE?
Q: What is the UNC path to a shared folder format? What distinguishes this from the drive letter and pa...
A: Before you can connect to the share you will need to know the following information: Server Name Sh...
Q: Explain why you would wish to use lightweight graphics on certain Web sites while using highly detai...
A: The use of graphics in web pages depending upon the scenario has been explained briefly below
Q: Why does the cancel button in a dialogue box appear to be unresponsive on so many systems? What comp...
A: Introduction: Why does the cancel button in a dialogue box appear to be unresponsive on so many syst...
Q: Write a complete Fortran program that asks three real numbers from the user, calculate the sum and t...
A: Your FORTRAN program is given below with an output.
Q: What table might the database need to help determine the balance field in the Patient table? Would y...
A: The database is a collection of interrelated data. In the Sports physical therapy database, there ar...
Q: JOY is a CS (B.TECH) student and now has days she wants to work on marketing. AND you are trying to ...
A: Introduction: It is used to perform large tasks (think thousands or millions of records!) That will ...
Q: Explain the distinction between the linear search and the binary search.
A: Introduction the question is about the difference between the linear search and the binary search a...
Python
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Implement a program that identifies a person based on their DNA. $ python3 dna.py databases/large.csv sequences/5.txt Lavender [https://drive.google.com/drive/folders/1uEjrE0VNWG5HZYcmsMD8ZJUWgeW2whK6?usp=sharing]Download the file that you're going to use for this problem. Extract this file and you will see a directory of sample databases and a directory of sample sequences. Specification In a file called dna.py, implement a program that identifies to whom a sequence of DNA belongs. The program should require as its command-line argument that name of a CSV file containing the STR counts for a list of individuals and should require as its second command-line argument the name of a text file containing the DNA sequence to identify. If your program is executed with the incorrect number of command-line arguments, your program should print an error message of your choice. If the correct number of arguments are provided, you may assume that the first argument is indeed a filename of a…Write a test client which takes a file path as an argument and reads each line one by one. The file can contain any number of DNA sequences (i.e., Strings.). After reading each DNA sequence, your code should print the DNA sequence first. Please follow the screenshot below for the output format. If the DNA sequence is valid DNA, report that and print out its complement as well as whether or not it is a Watson-Crick complemented palindrome. If the DNA sequence is not a valid DNA, only report that. Continue this process for each DNA sequence in the text file. Separate the outputs for each sequence by printing a line as shown in the screenshot. In your project directory, create a new directory named ‘in’. The in folder will contain the input text file, titled sequences.txt. To run the code, your program argument should be in/sequences.txt Method Summary. Return Type Method 1 boolean isValid(String DNA) 2 String…Write a program that finds all occurrences of a word in all the filesunder a directory, recursively. Pass the parameters from the command line asfollows:java Exercise18_30 dirName word
- Write a program that will read the file text.txt which is provided and the encryptedmessage in there. Please write back the decrypted message into the output.txt file.When you see the message in the output.txt file, you need to submit the java codefile. You need to use Rot13 class for decrypting the message. Do not need to submit in the output.txt file. file example: public class FileExample { public static void main(String[]args){ try {//create file object for input.txtFile in_file = new File("src/input.txt");//create file object for output.txtFile out_file = new File("src/output.txt"); //read the input.txt file with ScannerScanner read = new Scanner(in_file);//write the output.txt file with PrintWriterPrintWriter w = new PrintWriter(out_file); while(read.hasNextLine()){w.write(read.nextLine());} //don't forget to closew.close(); // while(scan.hasNext()){// System.out.println(scan.next());// } }catch(Exception ex){ex.getStackTrace();}Write a public static method called findContact which take the name of a contact as parameter, and prints the name and phone of that contact using the toString method if found in the contacts.dat binary file. If not found, display a message that Contact not found.Write a program that will sequentially list numbers from 0 to 50, changing its color depending on the size of the number, for example, for numbers from 0 to 10 it will be green, 11 to 22 red and 23 to 35 blue, etc. Limit the screen output speed to about 1 character / second. In order to change colors, you must first use the GetStdHandle function to get a handle to the console, which is similar to getting a file pointer before working with a file. It is done e.g. as follows: HANDLE hConsole; hConsole = GetStdHandle (STD_OUTPUT_HANDLE); The above functions are defined in windows.h Tip 2: Write a utility to find out the colors corresponding to all combinations from 0 to 255. Tip 3: Instructions and sample program for working with time. C language plz with explanation of codes. thanks
- Write a program that reads the-zen-of-python.txt and writes each line to UpdatedZen.txt, a new text file. It capitalizes the first character of each line and adds a period to the end of each line before writing it back to updatedzen.txt. the-zen-of-python.txt file contents: beautiful is better than ugly explicit is better than implicit simple is better than complex complex is better than complicated flat is better than nested sparse is better than dense readability counts special cases aren't special enough to break the rules although practicality beats purity errors should never pass silently unless explicitly silenced in the face of ambiguity, refuse the temptation to guess there should be one-- and preferably only one --obvious way to do it although that way may not be obvious at first unless you're Dutch now is better than never although never is often better than *right* now if the implementation is hard to explain, it's a bad idea if the implementation is easy to explain, it…Write a program that replaces all occurrences of a word with anew word in all the files under a directory, recursively. Pass the parameters fromthe command line as follows:java Exercise18_31 dirName oldWord newWordWrite a menu driven program which will maintain a list of car models, theirprice, name of the manufacturer, engine capacity, etc., as a doubly linked list. Themenu should make provisions for inserting information pertaining to new carmodels, delete obsolete models, update data such as price, in addition to answeringqueries such as listing all car models within a price range specified by the client andlisting all details, given a car model.
- Write an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format: Harry Potter t..d@hogwarts.edu Hermione Granger b..h@hogwarts.edu Ron Weasley r..b@hogwarts.edu Draco Malfoy m..s@hogwarts.edu Severus Snape h..e@hogwarts.edu Albus Dumbledore a..x@hogwarts.edu Your program should read from the file, storing the names and corresponding email addresses in a dictionary as key-value pairs. Then, the program should display a menu that lets the user enter the numbers 1 through 5, each corresponding to a different menu item: 1) look up an email address 2) add a new name and email address 3) change an email address 4) delete a name and email address 5) save address book and exit When the user enters 1, the program should prompt them for a name, and then print the corresponding email address. If there is no dictionary entry under that name, the program should print, "Sorry,…In python. Please do not copy elsewhere as it is all incorrect, and include docstring so that I can understand the information so I can apply the methods to future problems. Thanks. import the **json** module.Write a class named SatData that reads a [JSON file containing data on 2010 SAT results for New York City](https://data.cityofnewyork.us/api/views/zt9s-n5aj/rows.json?accessType=DOWNLOAD) and writes the data to a text file in CSV format. That same JSON file will be provided as a local file in Gradescope named **sat.json**. Your code does not need to access the internet.CSV is a very simple format - just commas separating columns and newlines separating rows (see note below about commas that are part of field names). You'll see an example of CSV format below. There is a csv module for Python, but you will not use it for this project.Your class should have:* an init method that reads the file and stores it in whatever data member(s) you prefer. Any data members of the SatData class…Write a python program that scans in a large number of tweets from a file, and prints the top 5 hashtags. Approach Parse each word in the file Find a way to isolate the hashtags from the rest of the tweet Compute the frequency of each unique hashtag. Find the top 5 hashtags. Caveats 1. Because this is public dataset, there are many tweets that use special characters that may cause issues during reading in your file. To avoid this, explicitly specify the encoding mode in open when reading in the file. with open('twitter_data.txt', 'r', encoding='utf8') as f: 2. When parsing hashtags be sure to change everything to lowercase. There are cases in the file where two hashtags are the same but differ in case. 3. There is no standard way of sorting a dictionary based on the values. Python gives you access to a sorted function where you can pass in a collection and also specify a comparator which outlines how you want to sort the values. This can be done with a one line lambda function.