0
Write a program
Write a program that accepts a string and outputs the number of characters in the string and the first and last characters in a separate line? Can I get help on working out this?
3 Answers
+ 1
Which language?
+ 1
In Python:
i = input()
print('Number of characters:', len(i))
print('First character:', i[0])
print('Last character:', i[-1])
+ 1
Java