Create a single program that completes the following. You will be submitting your finished program. 1. Create
Question:
Create a single program that completes the following. You will be submitting your finished program.
1. Create a List variable that will contain 5 items in the same category. The items should be something unique to you that you like. The items could be names of foods, bands, songs, places, animals, etc. - your list should be unique to you. Name the variable xyzthings (where xyz are your initials). Your items cannot be numbers, single characters, abbreviations, etc.
2. Have your program do the following and print the results of each step. Include a description of what is being printed.
- Print the initial List. Example print("Step 2a ",xyzthings)
- Sort the list (you choose how you would like to sort is ascending, descending, etc. - don't care)
- Show the 4th element in your list
- Append a 6th item to the list
- Insert a 7th item in the list between two other items (i.e. do not append)
- Remove the 4th item from your list
2. Answer the following questions: Note - Make sure you watch the YouTube https://www.youtube.com/watch?v=ohCDWZgNIU0&t=3s
- How is a Method different from an Object? Explain. Make sure in any explanation to use your own words and provide a comprehensive answer.
- Find two websites that provide specific help on Lists that you found useful. Include the URLs.
- How can you determine what methods are available that manipulate Lists, from within Python?
Turn in: Each assignment will list the specifics of what should be turned in. Pay attention to the directions and format.
Submit the following two files
- Your Python script text file. The naming convention for lab files is: LabX_ABC.py - where X is the Lab number and ABC are your initials
- A single MS Word document that contains:
- Screenshot of output from final script run (from your .py file)
- Answers to the questions above
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill