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.
<span>University of California, Berkeley _ comp sci
De Anza College, _ comp sci</span>
Answer:
The answer is "Option C"
Explanation:
The term DIMM stands for the Dual In-Line Memory Module, which is a kind of memory, that is used in computers. It is a small board of flash memory that uses the 64-bit memory bus because the SIMM has only a 32-bit path. It enables DIMMs to simultaneously transfer more information, and the wrong choices can be defined as follows:
- In choice A, It is used in sockets, that's why it is wrong.
- In choice B, It is wrong because it is used in 32 bits only.
- In choice D, It is wrong because it is used in the expansion of memory.