Rename function_1 to function_1.py
This commit is contained in:
11
python/function_1.py
Normal file
11
python/function_1.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# A SIMPLE FUNCTION - decides whether a text string starts with the letter a
|
||||
def starts_with_a(x):
|
||||
if x.startswith('a') or x.startswith('A'):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
print('ash', starts_with_a('ash'))
|
||||
print('3.14', starts_with_a('3.14'))
|
||||
print('six', starts_with_a('six'))
|
||||
print('Apple', starts_with_a('Apple'))
|
||||
Reference in New Issue
Block a user