subject
Computers and Technology, 02.02.2022 16:30 bri663

Given a string s of any length where all letters are lowercase. Write code which prints the index location of each letter 'o' in the string, one location per line of output.
Hint: enumerate() is your friend!
Given the string s:

happiness is when what you think, what you say, and what you do are in harmony. - gandhi

the output will be:
24
40
58
62
75

Use the input statement in the skeleton:
a = input("Input a string: ")

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:30
Write code using c . (take input from user) calculate the size of a given file in kbs. in this task you will complete the function with the following prototype: float get_file_size(char * filename); the function takes the file name (address to the start of a null terminated character array) as input. the function should then open the file and find the number of bytes it contains till eof. the number of bytes divided by 1024 will give the size in kbs. if the file cannot be opened the function should return -1.
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
You know the right answer?
Given a string s of any length where all letters are lowercase. Write code which prints the index...
Questions
question
Mathematics, 19.02.2021 22:20
question
Mathematics, 19.02.2021 22:20
question
Arts, 19.02.2021 22:20
question
Mathematics, 19.02.2021 22:20
question
History, 19.02.2021 22:20
Questions on the website: 13722361