crea un juego como tetris
def create_game():
print("""
____
/ __ \
/ / _` |
| | (_| |
\ \__,_|
\____/
""")
create_game()
All generations.
def create_game():
print("""
____
/ __ \
/ / _` |
| | (_| |
\ \__,_|
\____/
""")
create_game()
def create_front_end():
return 'html'
def play_game():
#game logic goes here
print('Estas jugando un juego')
play_game()
def tetris(a, b):
return a + b
def tetris():
#Your code
tetris()
def tetris(x, y):
return x**y
tetris(2, 3)
def add(a, b):
return a + b
add = lambda a, b: a + b
def tetris():
pass
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__':
app.run()
def medir_tiempo(n):
if n >= 1000:
return '{} mil'.format(n/1000)
elif n >= 100:
return '{} cientos'.format(n/100)
elif n >= 10:
return '{} decadas'.format(n/10)
elif n >= 5:
return '{} lustros'.format(n/5)
else:
return '{} lustros'.format(n)
medir_tiempo(10)
def estructura(n):
for i in range(n):
for j in range(n):
for m in range(n):
print(i, j, m)
estructura(3)
def tetris():
#code
return game
tetris()
class Game():
def __init__(self):
self.board = Board()
self.piece = Piece()
self.score = 0
self.game_over = False
# ...
def tetris(a, b):
return a * b
tetris(1, 2)
def play_tetris():
generar_figuras()
while(!game_over):
get_input_from_user()
update_game_state()
render_game()
sleep(0.1)
play_tetris()
for i in [1, 2, 3, 4]:
print(i)
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description