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?

26th May 2018, 9:55 AM
Joash Owuor
Joash Owuor - avatar
3 Respostas
+ 1
Which language?
26th May 2018, 10:01 AM
BlazingMagpie
BlazingMagpie - avatar
+ 1
In Python: i = input() print('Number of characters:', len(i)) print('First character:', i[0]) print('Last character:', i[-1])
26th May 2018, 11:16 AM
Just A Rather Ridiculously Long Username
+ 1
Java
30th Jan 2019, 5:42 AM
Tandrima Sinha
Tandrima Sinha - avatar