1. Homepage
  2. Programming
  3. XUT CP1404 Assignment 1 - Song List 1.0

XUT CP1404 Assignment 1 - Song List 1.0

Engage in a Conversation
James CookCP1404Programming IIPython

XUT CP1404 Assignment 1 Song List 1.0 <simplify> CourseNana.COM

Task: CourseNana.COM

You are to write a Python (3) program, as described in the following information and sample output. This assignment will help you build skills using selection, repetition, file input/output, exceptions, lists, functions and string formatting. Do not define any of your own classes or use constructs that haven't been taught in this subject. Assignment 2 will build on this with more advanced constructs including classes and a Graphical User Interface (GUI). CourseNana.COM

Everything you need to complete this assignment can be found in the subject teaching.
You will be given starter files including a README for your project, all of which you must use.
CourseNana.COM

Program Overview: CourseNana.COM

This program is a simple song list that allows a user to track songs that they wish to learn and songs they have completed learning. The program reads and writes a list of songs in a file. Each song has: CourseNana.COM

title, artist, year, whether it is learned
Users can choose to display the list of songs.
The song list should be sorted by year then by title (use operator.itemgetter) for sorting. Users can add new songs and mark (set) songs as learned.
They cannot change songs from learned to unlearned.
CourseNana.COM

Program Functionality Details: CourseNana.COM

Ensure that your program has the following features, as demonstrated in the sample output below. Your program should: CourseNana.COM

  • display a welcome message with your name in it CourseNana.COM

  • display a menu for the user to choose from CourseNana.COM

  • return to the menu after each action and loop until the user chooses to quit CourseNana.COM

  • load a CSV (Comma Separated Values) file of songs (just once at the very start); a CourseNana.COM

    sample CSV file is provided for you and you must use this format (note: you're not CourseNana.COM

    expected to use the csv module, but you're welcome to) CourseNana.COM

  • when the user chooses display: display a neatly formatted (lined up) list of all the songs CourseNana.COM

    with their details (unlearned songs have an * next to them) and a count of these songs (note: you are welcome to either guess or calculate the size of the title and artist fields to line them up - either way is fine) CourseNana.COM

  • when the user chooses add: prompt for the song’s title, artist and year, error-checking each of these, then add the song to the song list in memory (not to the file); new songs are always unlearned CourseNana.COM

  • when the user chooses to complete a song: allow the user to choose one song by number (error-checked), then change that song's status to learned CourseNana.COM

    o if no songs are unlearned, then display a "No more songs to learn!" message CourseNana.COM

  • when the user chooses quit: save the songs to the CSV file, overwriting file contents CourseNana.COM

    Coding Requirements and Suggestions: CourseNana.COM

  • Work incrementally on this task: complete small parts of it at a time rather than trying to get it all working at once. CourseNana.COM

  • Edit the module docstring at the very top of your code file to contain your own details. CourseNana.COM

  • Make use of named constants as appropriate (e.g., for the characters that represent CourseNana.COM

    the song's learned/unlearned status). CourseNana.COM

  • Use functions appropriately for each significant part of the program: this is the divide- CourseNana.COM

    and-conquer problem-solving approach. Follow the principles you've learned about XUT CP1404 Assignment 1 © Lindsay Ward, James Cook University 1/5 CourseNana.COM

functions, including the single responsibility principle (SRP). CourseNana.COM

  • Only load (read) the file once, when the program starts. CourseNana.COM

  • Only save (write) the file once, when the program ends. CourseNana.COM

  • Store the song data in a list of lists and pass that to any functions that need access CourseNana.COM

    to it. Note: this variable should not be global. The only global variables you may have are CONSTANTS. (Did you understand this? If you use global variables, your functions will be poorly designed. Do not use any global variables.) CourseNana.COM

  • Do not store a song's index this is just its position in the list. CourseNana.COM

  • The menu choice should handle uppercase and lowercase letters. CourseNana.COM

  • Use exception handling where appropriate to deal with input errors (including entering CourseNana.COM

    numbers and selecting songs). CourseNana.COM

  • Use generic, customisable functions to perform input with error checking (e.g., getting CourseNana.COM

    the song title and artist can reuse the same function). CourseNana.COM

  • The output shows that the solution does not require correct plurals (e.g., "1 songs"). CourseNana.COM

    You are welcome to leave yours this way. You may add logic to print these statements CourseNana.COM

    correctly, but it is not expected or assessed.
    Check the rubric carefully to understand how you will be assessed. There should be no surprises here
    this is about following the best practices we have taught in class. CourseNana.COM

    Integrity: CourseNana.COM

    The work you submit for this assignment must be your own. Submissions that are detected to be too similar to that of another student or other work (e.g., code found online or generated with tools) will be dealt with according to university procedures for handling plagiarism and may result in serious penalties. CourseNana.COM

    The goals of this assignment include helping you gain understanding of fundamental programming concepts and skills, and future subjects will build on this learning. Therefore, it is important that you develop these skills to a high level by completing the work and gaining the understanding yourself. You may discuss the assignment with other students and get assistance from your peers, but you may not do any part of anyone else’s work for them and you may not get anyone else to do any part of your work. Note that this means you should never give a copy of your work to anyone or accept a copy of anyone else’s work, including looking at another student's work or having a classmate look at your work.
    If you require assistance with the assignment, please ask general questions on the discussion forum, or get specific assistance with your own work by talking with your lecturer or tutor.
    The subject teaching contains all the information you need for this particular assignment. You should not use online resources (e.g., search, Stack Overflow, ChatGPT) to find resources or assistance as this would limit your learning and would mean that you would not achieve the goals of the assignment - mastering fundamental programming concepts and skills.
    CourseNana.COM

    Sample Output: CourseNana.COM

    Sample output from the program is provided below. Ensure that your program matches this, including spaces, spelling and formatting. Think of this as helpful guidance as well as training you to pay attention to detail. The sample output is intended to show a large (but maybe not exhaustive) range of situations including user input error handling. CourseNana.COM

    The following sample run was made using a CSV file that contained: CourseNana.COM

    Heartbreak Hotel,Elvis Presley,1956,u Macarena,Los Del Rio,1996,l
    Amazing Grace,John Newton,1779,l
    I Want to Hold Your Hand,The Beatles,1964,u Boom Boom Pow,The Black Eyed Peas,2009,u My Sharona,The Knack,1979,l
    CourseNana.COM

XUT CP1404 Assignment 1 © Lindsay Ward, James Cook University 2/5 CourseNana.COM

You should be able to figure out what parts of the sample output below are user input. CourseNana.COM

Song List 1.0 - by Lindsay Ward 6 songs loaded.
Menu:
D - Display songs
CourseNana.COM

A - Add new song
C - Complete a song Q - Quit
>>> this will be FUN Invalid menu choice Menu:
D - Display songs
A - Add new song
C - Complete a song Q - Quit
>>> d
CourseNana.COM

1. Amazing Grace 2. * Heartbreak Hotel CourseNana.COM

- John Newton
- Elvis Presley
- The Beatles
- The Knack
- Los Del Rio
- The Black Eyed Peas
CourseNana.COM

(1779)
(1956)
(1964)
(1979)
(1996)
(2009)

3. * 4. 5. 6. * CourseNana.COM

I Want to Hold Your Hand My Sharona
Macarena
Boom Boom Pow
CourseNana.COM

3 songs learned, 3 songs still to learn.
Menu:
D - Display songs
A - Add new song

C - Complete a song
Q - Quit
>>> c
Enter the number of a song to mark as learned. >>> 0
CourseNana.COM

Number must be > 0. >>> -1
Number must be > 0. >>> 9
CourseNana.COM

Invalid song number >>> 7
Invalid song number >>> 6
CourseNana.COM

Boom Boom Pow by The Black Eyed Peas learned Menu:
D - Display songs
A - Add new song
CourseNana.COM

C - Complete a song
Q - Quit
>>> c
Enter the number of a song to mark as learned. >>> 6
CourseNana.COM

You have already learned Boom Boom Pow Menu:
D - Display songs
A - Add new song
CourseNana.COM

C - Complete a song Q - Quit
>>> d
CourseNana.COM

1. Amazing Grace 2. * Heartbreak Hotel CourseNana.COM

- John Newton
- Elvis Presley
- The Beatles
- The Knack
- Los Del Rio
- The Black Eyed Peas
CourseNana.COM

(1779)
(1956)
(1964)
(1979)
(1996)
(2009)

3. * 4. 5. 6. CourseNana.COM

I Want to Hold Your Hand My Sharona
Macarena
Boom Boom Pow
CourseNana.COM

4 songs learned, 2 songs still to learn.
Menu:
D - Display songs
A - Add new song

C - Complete a song
Q - Quit
>>> a
Enter details for a new song. Title:
CourseNana.COM

Input can not be blank.
Title: Can I Walk With You?
Artist:
Input can not be blank.
Artist:
Input can not be blank.
Artist: See Jane Run
Year: 0
Number must be > 0.
Year: -1
Number must be > 0.
Year: why must the year be like that?
CourseNana.COM

XUT CP1404 Assignment 1 © Lindsay Ward, James Cook University 3/5 CourseNana.COM

Invalid input; enter a valid number.
Year:
Invalid input; enter a valid number.
Year: 1998

Can I Walk With You? by See Jane Run (1998) added to song list. Menu:
D - Display songs
A - Add new song
CourseNana.COM

C - Complete a song Q - Quit
>>> D
CourseNana.COM

1. Amazing Grace 2. * Heartbreak Hotel CourseNana.COM

- John Newton
- Elvis Presley
- The Beatles
- The Knack
- Los Del Rio
- See Jane Run
- The Black Eyed Peas
CourseNana.COM

(1779)
(1956)
(1964)
(1979)
(1996)
(1998)
(2009)
3. *
4.
5.
6. *
7.

I Want to Hold Your Hand My Sharona
Macarena
Can I Walk With You? Boom Boom Pow
CourseNana.COM

4 songs learned, 3 songs still to learn.
Menu:
D - Display songs
A - Add new song

C - Complete a song Q - Quit
>>> quit
Invalid menu choice Menu:
CourseNana.COM

D - Display songs
A - Add new song
C - Complete a song
Q - Quit
>>> q
7 songs saved to songs.csv Make some music!
CourseNana.COM

At the end of this run, the saved CSV file contained: CourseNana.COM

Amazing Grace,John Newton,1779,l Heartbreak Hotel,Elvis Presley,1956,u
I Want to Hold Your Hand,The Beatles,1964,u My Sharona,The Knack,1979,l
Macarena,Los Del Rio,1996,l
Can I Walk With You?,See Jane Run,1998,u Boom Boom Pow,The Black Eyed Peas,2009,l
CourseNana.COM

XUT CP1404 Assignment 1 © Lindsay Ward, James Cook University 4/5 CourseNana.COM

CourseNana.COM

Marking Scheme: CourseNana.COM

Ensure that you follow the processes and guidelines taught in class to produce high quality work. Do not just focus on getting the program working. This assessment rubric provides you with the characteristics of exemplary down to very limited work in relation to task criteria. CourseNana.COM

Criteria CourseNana.COM

Similarity to sample output
10% CourseNana.COM

Exemplary (9, 10) CourseNana.COM

All outputs match sample output perfectly, or only one minor difference, e.g., wording, spacing. CourseNana.COM

Good (7, 8) CourseNana.COM

Satisfactory (5, 6) CourseNana.COM

Multiple differences (e.g., typos, spacing, formatting) in program output compared to sample output. CourseNana.COM

Limited (2, 3, 4) CourseNana.COM

Very Limited (0, 1) CourseNana.COM

No reasonable attempt made to match sample output. Very many differences. CourseNana.COM

Correctness CourseNana.COM

20% CourseNana.COM

Program works correctly for all functionality required. CourseNana.COM

Program mostly works correctly for most functionality, but there is/are some required aspects missing or that have problems. CourseNana.COM

Program works incorrectly for all functionality required. CourseNana.COM

Error checking CourseNana.COM

10% CourseNana.COM

Invalid inputs are handled well using exceptions and control logic as instructed, for all user inputs. CourseNana.COM

Invalid inputs are mostly handled correctly as instructed, but there is/are some problem(s), e.g., exceptions not well used. CourseNana.COM

Error checking is not done or is very poorly attempted. CourseNana.COM

Identifier naming CourseNana.COM

10% CourseNana.COM

All function, variable and constant names are appropriate, meaningful and consistent. CourseNana.COM

Multiple function, variable or constant names are not appropriate, meaningful or consistent. CourseNana.COM

Many function, variable or constant names are not appropriate, meaningful or consistent. CourseNana.COM

Use of code constructs 20% CourseNana.COM

Appropriate and efficient code use, including good logical uses of constants, data structures, decision and repetition structures. CourseNana.COM

Mostly appropriate code use but with some problems, e.g., unnecessary code, poor use of constants, data structures, decision and repetition structures. CourseNana.COM

Many significant problems with code use. CourseNana.COM

Use of functions CourseNana.COM

15% CourseNana.COM

Functions and parameters are appropriately used, functions are well reused to avoid code duplication, functions follow SRP well. CourseNana.COM

Reasonable but not good use of functions, e.g., poor parameter choices, function choices don't follow SRP well, too much low-level detail in main. CourseNana.COM

No functions used or functions used very poorly.
Any use of global variables. CourseNana.COM

All code formatting is appropriate, including correct indentation, horizontal spacing and consistent vertical line spacing. PyCharm shows no formatting warnings. CourseNana.COM

Multiple problems with code formatting reduce readability of code. PyCharm shows formatting warnings. CourseNana.COM

Readability is poor due to code formatting problems. PyCharm shows many formatting warnings. CourseNana.COM

Meaningful docstrings for all functions, appropriate # block/inline comments, top docstring and README are complete. CourseNana.COM

Missing function docstrings, noise comments or missing block/inline comments, details missing from top docstring or README. CourseNana.COM

Commenting is very poor either through having too many comments (noise) or too few comments. CourseNana.COM

Exhibits aspects of exemplary (left) and satisfactory (right) CourseNana.COM

Exhibits aspects of satisfactory (left) and very limited (right) CourseNana.COM

XUT CP1404 Assignment 1 © Lindsay Ward, James Cook University CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
James Cook代写,CP1404代写,Programming II代写,Python代写,James Cook代编,CP1404代编,Programming II代编,Python代编,James Cook代考,CP1404代考,Programming II代考,Python代考,James Cookhelp,CP1404help,Programming IIhelp,Pythonhelp,James Cook作业代写,CP1404作业代写,Programming II作业代写,Python作业代写,James Cook编程代写,CP1404编程代写,Programming II编程代写,Python编程代写,James Cookprogramming help,CP1404programming help,Programming IIprogramming help,Pythonprogramming help,James Cookassignment help,CP1404assignment help,Programming IIassignment help,Pythonassignment help,James Cooksolution,CP1404solution,Programming IIsolution,Pythonsolution,