Saltar al contenido

ejemplo de código python de juego de póquer

Contamos con el resultado a esta cuestión, al menos eso esperamos. Si presentas preguntas dínoslo, que sin tardar

Ejemplo: cómo hacer un juego de póquer en python

#pokerprint("poker username: ")
name =input("")print("age: ")
age =input("")#continueinput("nnPress the [enter key]")#make random cards by importingimport random

#player cardsprint("your cards: ")
card1 = random.randint(1,12)
card2 = random.randint(1,12)
player_cards = card1, card2
print(player_cards)#first table cards
table1 = random.randint(1,12)
table2 = random.randint(1,12)
table3 = random.randint(1,12)
table_full = table1, table2, table3
print("the first table cards are:")print(table_full)#betprint("put in the amount you would like to bet")
bet1 =input("")#next table card
table4 = random.randint(1,12)print("full table is now: ")
table = table1, table2, table3, table4
print(table)#bet number 2print("put in the amount you would like to bet")
bet2 =input("")#next next table card
table5 = random.randint(1,12)print("full table is now: ")
table12345 = table1, table2, table3, table4, table5
print(table12345)#loser or winner?print("player2 had: ")
card12 = random.randint(1,12)
card22 = random.randint(1,12)
player2 = card12, card22
print(player2)#full layoutprint("this is the full table now")print(player_cards)print(table12345)print(player2)#play again?
play =input("do you want to play again")if play =="yes":exec(open("./pokerface.py").read())else:
        exit()

Eres capaz de añadir valor a nuestro contenido contribuyendo tu experiencia en las ilustraciones.

¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)



Utiliza Nuestro Buscador

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *