Assignment1 Part A 1. Given: Colors ('Red', 'Blue', 'Green', 'Black', 'White') Using Python Method of Accessing Elements From A List To
Assignment1 Part A 1. Given: Colors ('Red', 'Blue', 'Green', 'Black', 'White') Using Python Method of Accessing Elements From A List To
Part A
7. Ask the user for a string and print out whether this string is a palindrome or not. (A
palindrome is a string that reads the same forwards and backwards.)
8. Ask the user for a number. Depending on whether the number is even or odd, print out
an appropriate message to the user, e.g, “The number just entered is even” if the
number is an even number, and vice versa.
Part B
1. What is a variable?
5. What are the escape sequences in Python? Give an example of how each of them is
used.
Part C