PythonExercises Part2
PythonExercises Part2
1. Declare and assign a variable stores your favourite movie quote or song lyrics in a
variable called quote or lyric
2. Declare and assign a variable that stores your name
a. Add a comment that states what variable type this is
3. Write a program in python that asks the user for 3 numbers then saves the total in a
new variable
a. Print the total back to them
b. Add a multi line comment that explains what this program does
4. Add a comment that states the data type of the following variable: x = 43.56
5. As a comment, state what letter will be printed to the screen after running in the
following code:
6. As a comment, state what letter will be printed to the screen after running in the
following code:
7. Use string slicing to print ´if´ from the variable statement, shown above
a. Add a comment to explain how string slicing works
8. Name = “Jimmy”
Print a sentence that includes the variable above, you must make use of string
concatenation
9. As a comment, state what the following code will print
a. Explain why you think this