The first 3 should be the answer
Answer:
def count(userInput, character):
occurrences = 0
for character_in_string in userInput:
if(character == character_in_string):
occurrences += 1
return occurrences
userInput = input("Enter string: ")
character = input("Enter character: ")[0]
print(count(userInput, character))
Explanation:
- Define a count function that takes in the userInput as a string and character parameters.
- Loop through the userInput and check whether selected character is equal to the character found in the string.
- Increase the counter of occurrences by 1 if the condition is true and then return the occurrences.
- Take the userInput and character as input from the user.
- Finally display the results by calling the count function.
Answer:
search it on
Explanation:
<h2>GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE</h2>
Answer:
The answer to this question is option (a).
Explanation:
In the computer, all the data will store in a file that can be text file, image file, etc.
All the file store data into (binary language that is (0,1)). In Microsoft Word or any other word software, we add, delete or modify any text that stores in file. The software adjusts text location, memory, and breaks the pages automatically.
So the correct answer to this question is option (a).