Create string that is long series of word separated by space


Homework: Python

Part A

o Describe the difference between objects and values using the terms "equivalent" and "identical". Illustrate the difference using your own examples with Python lists and the "is" operator.

o Describe the relationship between objects, references, and aliasing. Again, create your own examples with Python lists.

o Finally, create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of arguments, parameters, objects, and references.

o Create your own unique examples for this homework. Do not copy them from the textbook or any other source.

Part B

Write a Python program that does the following.

o Create a string that is a long series of words separated by spaces. The string is your own creative choice. It can be names, favorite foods, animals, anything. Just make it up yourself. Do not copy the string from another source.

o Turn the string into a list of words using split.
o Delete three words from the list, but delete each one using a different kind of Python operation.
o Sort the list.
o Add new words to the list (three or more) using three different kinds of Python operation.
o Turn the list of words back into a single string using join.
o Print the string.

Part C

Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.

o Nested lists
o The "*" operator
o List slices
o The "+=" operator
o A list filter
o A list operation that is legal but does the "wrong" thing, not what the programmer expects

Provide the Python code and output for your program and all your examples.

Format your homework according to the following formatting requirements:

o The answer should be typed, using Times New Roman font (size 12), double spaced, with one-inch margins on all sides.

o The response also includes a cover page containing the title of the homework, the student's name, the course title, and the date. The cover page is not included in the required page length.

o Also include a reference page. The Citations and references must follow APA format. The reference page is not included in the required page length.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Create string that is long series of word separated by space
Reference No:- TGS03113489

Expected delivery within 24 Hours