Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored Jun 23, 2022
1 parent 6191a3b commit 5e23618
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Abbreviate_a_two_word_name_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # Abbreviate a two word name
# turn the string into a list by spliting it
# Create a variable N containing only the first letter of the two names and put a "." between
# Return n.title() to ensure that every letter is always capitalised

def abbrev_name(name):
list = name.split()
n = str(list[0][0] + "." + list[1][0])
return n.title()

0 comments on commit 5e23618

Please sign in to comment.