Last active
January 28, 2017 00:21
-
-
Save welkerc/fd568a2d683143b7b78ee21b2af73aca to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| J = 11 | |
| Q = 12 | |
| K = 13 | |
| A = 14 | |
| rank = [1,2,3,4,5,6,7,8,9,10,J,Q,K,A] | |
| player1 = rank[random.randint(0,13)] | |
| player2 = rank[random.randint(0,13)] | |
| print "Player 1: " + str(player1) | |
| print "Player 2: " + str(player2) | |
| if player1 == player2: | |
| print "tie" | |
| elif player1 < player2: | |
| print "Player 2 Wins" | |
| elif player1 > player2: | |
| print "Player 1 Wins" | |
| else: | |
| print "I haven't got a clue..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment