Question: For this assignment, you are going to be working with the Pizza file created in the Practical vi video and you will be working with
For this assignment, you are going to be working with the Pizza file created in the Practical vi video and you will be working with the emacs pizzaE file. If you did not create these you need to watch the practical videos and create them. Your files need to be created to match all of the steps done in the video, including adding blank lines and information to them.Open your vi pizza file: Count the number of words in the file and record your answer as X words by hand where X is the number that you have counted.In command mode, run the command :wcw pizza take a screen shot of the answer that it gives you and add it to your document.Now look over your pizza file and count the number of characters in the file and record your answer as X characters by hand you should count white spaces.In command mode run the command :wcchar pizza take a screen shot of the answer that it gives you and add it ot your document.Do either the word count or character count differ between what you counted and what the command returned to you as a value? If yes, explain why you believe this is the case.Working with a new file using vi:Using vi create a new file on the server called groceriesCreate a grocery list with the following items bread, milk, eggs, chicken, spinach, greek yogurt, cherry tomatoes, bell peppers, sliced cheese, brown rice, frozen strawberries, deli turkey, olive oil, sweet potatoes, dark chocolate. Keep in mind to be able to insert information into the file you must be in input modeYour list should have one item per line without any commas.Save your file and exit viOn the server run the cat command on this file to show the items that are listed. Take a screenshot and add it to your documentGo back into the file and in command mode run the command :sortTake a screen shot and add it to your documentExit vi without saving.Run cat groceries and make sure that your file is unsorted, take a screenshot and it to your document. If it is sorted it means you have exited vi saving the file and will have to recreate the file unsorted.Working with emacs:Answer the questions below on your document. Use the image of the given code to answer your questions.image.png NOTE THE LOCATION OF THE CURSOR, THIS WILL BE IMPORTANT FOR YOU TO ANSWER THE QUESTIONS CORRECTLY.What emacs command not arrow keys can you use to move the cursor to the of main?Which command not arrow keys will move the cursor to the closing bracket of subtract?Suppose that you want to write two more functions multiplication and division and intend to use subtract as a starting point for further editing. How would you make two copies of the subtract function?How would you compile the code without leaving emacs?Checking your answers:Now that you have answered the questions above, lets check your answers.Download the code file onto your computer.Use the scp command on the server to copy the file from your computer to the server be sure you know the file path of where the file is on your computer and where you want it saved on the serverOpen the file using emacsPlace your cursor at the end of the return statement inside the add function as shown in the image above.Run the command as you specified in question # Does it work as you expected? If not, explain how the answer you provided works or does not work, then provide the correct command that would have been the answer to #Without moving the cursor, keep it where it currently is the of main, run the command that you used to answer question # Does it work as you expected? If not, explain how the answer you provided works or does not work, then provide the correct command that would have been the answer to #Use the command that you wrote for question # to compile the program. Does it work as you expected? If not, explain how the answer you provided works or does not work, then provide the correct command that would have been the answer to # Take a screenshot showing that your code compiled and add it to your document. Note this instruction is out of order on purpose, this is so you will be able to get your program to compile.Use the command that you wrote for question # to make two copies of the subtract function. Does it work as you expected? If not, explain how the answer you provided works or does not work, then provide the correct command that would have been the answer to #BONUS: Update the code for the two subtract copied functions to correspond to multiplication for one, and division for the other.Add the two new function declarations to your code before mainCall and print the results of these two functions inside the main program after subtract.Recompile your program.Save itOn the server, execute the program that you have just written. To execute you just use the command filename this would be the filename that you gave to the executable file when you compiled itTake a screen shot of your program running and submit it in your document.Use the copy command to copy the file from the server to your computer. Take a screenshot and add it to your document.Deliverable for grading:LastnameAsgpdf
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
