1. Write an expression whose value is the result of converting the str value associated with s to an int value. So if s were associated with "41" then the resulting int would be 41.2. Write an expression whose value is the last character in the str associated with s.

3. Given variables first and last, each of which is associated with a str, representing a first and a last name, respectively. Write an expression whose value is a str that is a full name of the form "Last, First". So, if first were associated with "alan" and last with "turing", then your expression would be "Turing,Alan". (Note the capitalization! Note: no spaces!) And if first and last were "Florean" and "fortescue" respectively, then your expression’s value would be "Fortescue,Florean".

4. Write an expression whose value is the result of converting the int value associated with x to a str. So if 582 was the int associated with x you would be converting it to the str "582".

5. Write an expression whose value is the str consisting of all the characters (starting with the sixth) of the str associated with s.

Respuesta :

CPED

Answer:

The solution or expression for each part is given below:

  1. int(s)
  2. s[len(s)-1]
  3. last.capitalize()+','+first.capitalize()
  4. str(x)
  5. s[5:]

Explanation:

Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.

All the images below are respective to the questions given.

Ver imagen CPED
Ver imagen CPED
Ver imagen CPED
Ver imagen CPED