Homework Helpers

Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

First, create the lab08 folder using the mkdir command — the folder needs to be inside your Labs folder as well.Next, copy a file into your lab08 folder using the cp command.cp /afs/umbc.edu/users/k/k/k38/pub/cs201/given_spend.py spending.pyThis will copy the file given_spend.py from Dr. Gibson’s public folder into your current folder, and will change the file’s name to spend.py instead.The first thing you should do in your file is complete the file header comment, filling in your name, section number, email, and the date.CMSC 201 – Computer Science I for Majors Page 7Part 3B: Finishing the FunctionsAt this point, if you try to run the file, it will only print out the category titles for the expenditures, and nothing else. That is because the file is only partially completed for you.You will need to update the file to complete the two function definitions, and one function call. If you open the file, you should see comments boxed in by #signs – these are where you need to write new code. Read the function header comments to see the details about the two functions.You’ll need to think carefully about the two-dimensional spending list and how its contents are organized (and how you can access them). It might be helpful to draw a visual representation, and to label the indexes.For printSpending() and tallySpending(), you’ll need to write awhile loop. Make sure to pay attention to what the function’s already written code does, as well as things like variable names.Once both functions are complete, you need to call tallySpending() down in main(), as well as uncommenting the print() statement below it. Youshouldn’t need to write any other code.(See the next page for sample output.)CMSC 201 – Computer Science I for Majors Page 8Here is some sample output of the completed program.There is no user input, and yours should be identical once it’s complete.(The printed list of expenditures for eating out is long enough to wrap around in this document, but is should not wrap around when you run it in the terminal.)bash-4.1$ python spending.pySpending:EAT OUT :49.3VEHICLE :GROCERIES :UTILITIES :PERSONAL :ENTERTAIN :PET CARE :RENTING :8930.27165.31 17.329.1623.1140.71In category EAT OUTIn category VEHICLEIn category GROCERIESIn category UTILITIESIn category PERSONALIn category ENTERTAINIn category PET CAREIn category RENTINGYou spent a total of.49 was spent.78 was spent.19 was spent.63 was spent.43 was spent.69 was spent.56 was spent was spent.77 this month2515.66100130040.525.9948.9833.0442.45CMSC 201 – Computer Science I for Majors Page 9Part 4: Completing Your LabSince this is an in-person lab, you do not need to use the submit command to complete your lab. Instead, raise your hand to let your TA know that you are finished.They will come over and check your work – they may ask you to run your program for them, and they may also want to see your code. Once they’ve checked your work, they’ll give you a score for the lab, and you are free to leave.

Students are often burdened with the task of writing essays. They need to master various academic topics, understand how to integrate facts and arguments, and organize all of this information in a clear and logical way. This is not an easy task for many students. But fear not! We’ve got your back. Here at MoreEssays.com, we offer professional academic help that can take on all these tasks on your behalf. All you need to do is fill out the Order form with your paper’s details, and we will get started on it right away!

Click Here to get this paper done within your deadline 

Can't find what you are looking for?

Post your question on MoreEssays and get help from one of our expert tutors in topics ranging from mathematics to rocket science!