A few problems from a CS homework due tonight! P

Question

A few problems from a CS homework due tonight! 


Please help! Using Python 3.4

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. 


Details
Purchase An Answer Below

Have a similar question?