0
Converter minúsculas em maiúsculas e imprimir
Devo converter 3 palavras de minúsculas para maiúsculas em Python e imprimir separadas, porém não estou conseguindo, toda vez sai às 3 juntas.
4 Answers
+ 1
Mar1oVVar65
The first line takes an input and assigns it to a variable 'text'. If we enter a sentence or just 3 words the variable 'text' will be automatically assigned as a 'string' type variable.
We can debug our program by adding this line:
print(text.upper())
Now, YOU need to break this string into 3 pieces and print each word on a separate line using the method I posted earlier.
You are printing 3 'hard coded' words: hello, NASA, bmw. The output will always be the same regardless of program input. You need to remove the 3 print statements for your code to pass the tests.
Good luck!
+ 6
The split() method is your friend here 😉
https://www.geeksforgeeks.org/JUMP_LINK__&&__python__&&__JUMP_LINK/python-string-split/
+ 4
Mar1oVVar65 Você poderia mostrar sua tentativa de código para que possamos ajudá-lo a corrigi-lo e aprender como fazê-lo?
0
text = input()
print('hello'.upper())
print('nasa'.upper())
print('bmw'.upper())
#convert to uppercase
#display on the screen