0

Function in python

def is_vowel(letters): If #blank#: return (True) else: return (False) Replace the blank so is_vowel becomes a function that takes letter as input and print whether a letter is vowel?

21st Apr 2020, 11:39 AM
Kriti Parashar
4 odpowiedzi
+ 1
Look, the logic part should be in the function.. The if part should be outside the function... First try to write the logic in the function part.. And then take input from the user and write tha same if and else blocks after receiving input from the user...
21st Apr 2020, 12:13 PM
sarada lakshmi
sarada lakshmi - avatar
+ 1
You just serch for the letter in a,e,i,o,u and your done
21st Apr 2020, 12:21 PM
Sajid
Sajid - avatar
0
def is _vowel(letter): return letter in 'aeiou'
23rd Apr 2020, 4:18 PM
Zuke
Zuke - avatar
- 1
def is_vowel(letters): If is_vowel('a') return (True) else: return (False)
24th Apr 2020, 3:24 PM
Rama Alfiandi
Rama Alfiandi - avatar