top of page

Assignment 05D – Daily Specials

Assignment 05D – Daily Specials


ALIGNMENT: This assignment provides practice with using functions, parallel lists/tuples, and reading data from a text file and writing data to a text file.


ASSIGNMENT: Create a Python program that reads the daily specials for a restaurant from a text file to populate a list corresponding to the days of the week (Sunday – Saturday). The program should then present the week’s specials, allow the user to change a day’s special, and automatically save the data back out to storage, replacing the existing data file. It should also show the meal for any user-requested specific day.


Instructions:


Save your file with as “CIS156_05A_Daily_Specials_YourLastName.py


  • Print the project tile on the first line. Print the next line showing your name as the developer, followed by a blank line (remember you can use \n). Then provide a description of what the program does.

  • Your program must use a list (or tuple) in holding a data collection of the daily specials as well as a list or tuple for the days of the week

  • Read the daily special items from the provided text file (see Canvas Assignment or Week 5 module) Tip: You can use the .split(“\n”) function to separate the lines into a list upon using the read( ) function.

  • Use functions for 1.) reading the data and processing it into the global list; 2.) a function to write the data back out to the data file upon any changes by the user; 3.) A function to show the special for a user specified day; 4.) a function to show the user choices; 5.) A function to change the special for a specified day *(this one calls the second function to write the data); and 6.) A main() function to control the program at the outset.

  • You may not use any features not yet covered in this course or discussed above, such as classes or sets.


Output look like thats:

Try to do itself, if need any help contact to the codersarts expert team.


If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion  you can send mail at contact@codersarts.com.

Please write your suggestion in comment section below if you find anything incorrect in this blog post. 

1 view0 comments
bottom of page