Aug-29-2022, 08:41 AM
(This post was last modified: Aug-29-2022, 08:42 AM by Yoriz.
Edit Reason: Added code tags
)
i made this but i cant test it cause i am on a chromebook and the compiler i used wont work, i want this to give player_ones_hand
7 random cards
(bold text is the program i think not sure \'_'/)
have indented everything by the way
7 random cards
(bold text is the program i think not sure \'_'/)
import random def draw_card(): card_drawn_INT = random.randint(1, 10) if card_drawn_INT <= 4: card_drawn = [infantry] elif card_drawn_INT == [5,6,7,8]: card_drawn = [tank] elif card_drawn_INT == [9,10]: card_drawn = [plane] return card_drawn_INT return card_drawn print(card_drawn_INT) print(card_drawn) def deal_player_one(): player_one_hand = [] for i in(7): draw_card player_one_hand[] = player_one_hand + card_drawn return player_one_hand print(player_one_hand)
have indented everything by the way