Question: plz answer these short Qs in python language thanks Q1- Writean expression whose value is thecharacter at index 3 ofthe str associated with s. Q2-
plz answer these short Qs in python language thanks
Q1- Writean expression whose value is thecharacter at index 3 ofthe str associated with s.
Q2- Write an expression whose valueis the str that consists of the third tolast character of the str associatedwith s.
Q3- Assumethat given, middle and family arethree variables oftype String that have been assignedvalues. Write an expression whose value isa String consisting of the firstcharacter of given followed by a period followed by thefirst character of middle followed by a period followedby the first character of family followed by a period: inother words, the initials of the name. So if thevalues of these three variables were "John" "Fitzgerald""Kennedy", then the expression's value wouldbe "J.F.K.".
Q4- Write an expression whose valueis the str that consists of the first fourcharacters of the str associatedwith s.
Step by Step Solution
3.52 Rating (152 Votes )
There are 3 Steps involved in it
Answer 1 s3 Explanation Python allows to access the characters in a string using index position The ... View full answer
Get step-by-step solutions from verified subject matter experts
