Answer:
#read value of name
name=input("Enter name:")
#find and ptint the last character of the string
print("last character of string is:",name[-1])
Explanation:
Read a string from user and assign it to variable "name".Find its last character as "name[-1]". Since name is character array,so name[-1] will give the last character of the array.
Output:
Enter name:Smith
last character of string is: h
Microsoft
no