0

How can i put these in this code?sentence = input ("Please enter your sentence\n").upper() listOfWord = sentence.split() senten

Frequency and sorting words https://code.sololearn.com/cwBC7WjweGAo/?ref=app

20th May 2023, 12:44 PM
Elahe Anna
Elahe Anna - avatar
11 ответов
+ 5
Make it yourself, so you’ll learn more ;)
20th May 2023, 7:26 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 4
Your code seems to work. What is your question? Do you want to sort the final dict?
20th May 2023, 1:19 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 3
Use sorted() function sorted(listdict) sorted(dict) That will sort the elements
20th May 2023, 7:21 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 3
Elahe Anna BTW, don't use existing class or function names, like "dict", for your own variables, classes or functions. Otherwise, you'll overwrite the original one, and it can result in weird and hard to debug errors.
20th May 2023, 10:27 PM
Emerson Prado
Emerson Prado - avatar
+ 1
Yes
20th May 2023, 3:38 PM
Elahe Anna
Elahe Anna - avatar
+ 1
Ok tnx🥲
20th May 2023, 7:27 PM
Elahe Anna
Elahe Anna - avatar
+ 1
I don't know what you mean, but if you want the code in a correct format here it is: sentence = input("Please enter your sentence\n").upper() listOfWords = sentence.split() for word in listOfWords: print(word) hope this helps!
21st May 2023, 11:03 PM
nob nob
0
Can you edit thah code for me plz?🥺
20th May 2023, 7:23 PM
Elahe Anna
Elahe Anna - avatar
0
I think i know what you want
22nd May 2023, 9:20 AM
zain Shendy
0
Do you want to put this in the bar of the input "please enter your sentence"?
22nd May 2023, 9:22 AM
zain Shendy
0
zain Shendy It is crystal clear in the previous answers. Pls double check.
22nd May 2023, 10:13 AM
Emerson Prado
Emerson Prado - avatar