Write a python function to ask the user to input a sentence. If the sentence begins with a vowel, Return the sentence as it is to be printed. If the sentence does not begin with a vowel, Change the first letter to a capital letter and return the sentence to be printed.
Вот что я придумал:
sentence = input("Enter a Sentence:")
vowels = ['a', 'e', 'i', 'o', 'u']
if: (sentence.find [0]=vowels)
print (sentence)
else:
(sentence[0].upper())
@vencaslac Я новичок, вот что я придумал
@vencaslacsentence = input ("Введите предложение:") vowels = ['a', 'e', 'i', 'o', 'u'] if: (предложение.find [0] = гласные) print (предложение ) else: (предложение [0] .upper ())






У вас правильная идея, но ваш синтаксис неверен. см. ниже
sentence = input('Enter a Sentence:')
vowels = ['a','e','i','o','u']
if sentence[0] in vowels:
print(sentence)
else:
print(sentence.capitalize())
Это домашнее задание? См .: meta.stackoverflow.com/questions/334822/… (самый важный момент: сначала постарайтесь решить проблему самостоятельно.)