Yup
Written with StackEdit.
| import pyxel | |
| import random | |
| # initialisation du jeu | |
| pyxel.init(160, 120, fps=30) | |
| # variables GLOBALES, évaluées une seule fois au lancement du jeu | |
| y = random.randint(0, 120) | |
| text_color = random.randint(0, 15) |
| const std = @import("std"); | |
| const raylib = @import("raylib.zig"); | |
| const stdout = std.io.getStdOut().writer(); | |
| const screenWidth = 800; | |
| const screenHeight = 450; | |
| const GameScreen = enum(u2) { | |
| logo, |
Yup
Written with StackEdit.
| if True: | |
| pass |
| def solve_euler_explicit(f, x0, dt, t0, tf): | |
| N = int((tf-t0)/dt) | |
| t = np.linspace(t0,tf,N) | |
| x = np.array([x0]*N) | |
| for i in range(1,N): | |
| x[i] = x[i-1] + dt*f(t[i-1],x[i-1]) | |
| if type(x0) == int or type(x0) == float: | |
| return t,x |