-
-
Save amankharwal/299ee5a833eb80429e4ffa0f7600f8fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
cards = ["Diamonds", "Spades", "Hearts", "Clubs"] | |
ranks = [2, 3, 4, 5, 6, 7, 8, 9, 10, "Jack", "Queen", "King", "Ace"] | |
def pick_a_card(): | |
card = random.choices(cards) | |
rank = random.choices(ranks) | |
return(f"The {rank} of {card}") | |
print(pick_a_card()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment