+ 2
A string value containing more than 1 word is passed as the input(runtime) to the program(hint-use swapcase by splitting-string
input: tHiS is my book output: ThIs is my book
10 odpowiedzi
+ 2
great thanks for your help Anna
+ 1
Change the first line to sentence = input()
+ 1
Really? It does exactly what is asked. It capitalizes the first word and leaves all other words unchanged
+ 1
Oh. I didn't notice the capital I. In this case, change .capitalize() to .swapcase().
0
A string value containing more than 1 word is passed as the input(runtime) to the program(hint-use swapcase by splitting-string
input:
tHiS is my book
output:
ThIs is my book
NOTE : the input must be at the runtime
PYTHON
0
I changed but it's not giveing the correct output is mentioned in the question " Anna "
0
use the swapcase for the first word alone and the rest would be printed as such from the intput "Anna "
0
see the input :
tHiS is my book
output :
ThIs is my book
input -->tHiS
converted by swapcase to
output -->ThIs
and see your output Anna
0
A string value containing more than 1 word is passed as input to the program it must print all the words starting with letter 't'
input:
I went to the movie
output :
to the
Note:use ( startswith ) method
PYTHON