Computer Science, asked by adarshsrekanthpbulaa, 3 months ago

Write a PYTHON program that asks the user to enter a string. The program should then print the following:
a. The total number of characters in the string
b. The string repeated 10 times
c. The first character of the string (remember that string indices start at 0)
d. The first three characters of the string
e. The last three characters of the string
f. The string backwards
g. The string with its first and last characters removed
h. The string in all caps
i. The string with every a replaced with an e
j. The string with every letter replaced by a space

Fake answers will be *reported*

Answers

Answered by Sharmsprachi193
2

Explanation:

def string_length(str1):

count = 0

for char in str1:

count += 1

return count

print(string_length('w3resource.com'))

Sample Output:

14

Flowchart:

Similar questions