need help my python homework. here is the assignment detail .
Using the interactive Python shell, type in and evaluate Python expressions for each of the following. Use online resources if you are not sure of the needed Python operator for performing an operation.
- Try out the following expressions and statements:
- 10 / 3
- 10 // 3
- 10 % 3
- list1 = [“cat”, “dog”, “emu”]
- list2 = [“asp”, “bat”, “owl”]
- list1 + list2
- list3 = [23, 45, 10]
- Assign these hiking distances to a list: 12, 23, and 18 miles. Then, using your list, find the average distance.
- Explain the difference between these three operators: /, //, %.
- Assign 8 to the variable
val. What happens if you type in
"The answer is " + val? What do you need to do to avoid the error?
- What is the difference between
Python Scripts (little programs)
Write and test Python scripts (create a py file each) that do the following:
- Read in three integers (use input statements) and write out a summary message that includes the average of the three integers.
- Prompts and reads (use input statements) in three words or phrases (e.g. a color, an action, an animal) and then produces a short statement or story that includes the three words or phrases.
Create a text file called assn1.txt that contains the following:
- A statement, possibly very brief, that summarizes your completion of the assignment
- The text of your interactive Python exercises
- The answers to the questions
- For each of your Python scripts:
- A listing of the script (copy the code in the py file and past it in the assn1.txt file)
- Running examples that demonstrate that your script works correctly (copy the text that shows your py file running and paste it in the assn1.txt file)