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 1, 2022
1 parent e1c2fe5 commit 0a827a6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Define_a_card_suit_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# # Define the suit the card comes from
# If statement that checks the last character on the string in question and returns the appropriate suit

def define_suit(card):
if card[-1] == "C":
return "clubs"
elif card[-1] == "D":
return "diamonds"
elif card[-1] == "H":
return "hearts"
elif card[-1] == "S":
return "spades"
else:
return "Error"

0 comments on commit 0a827a6

Please sign in to comment.