Ask Question
16 March, 21:32

python3 Write a program with a function that accepts a string as an argument and returns a copy of the string with the first character of each sentence capitalized. For instance, if the argument is "hello. my name is Joe. what is your name?" the function should return the string "Hello. My name is Joe. What is your name?". The program should let the user enter a string and then pass it to the function. The modified string should be displayed.

+5
Answers (1)
  1. 17 March, 01:03
    0
    MyString = input ('Enter string: ')

    string_capitalize (MyString)

    print (MyString)

    def string_capitalize (str):

    str = str. capitalize ()

    return str

    Explanation:

    This python code is learnt to access string value from users and capitalize all characters in the beginning of each sentence.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “python3 Write a program with a function that accepts a string as an argument and returns a copy of the string with the first character of ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers