Professional Documents
Culture Documents
1 Intro Pemrograman
1 Intro Pemrograman
Introduction
Ahmad Syihan Auzani, PhD
• Flowchart algorithm is
mandatory in exam
Ahmad This
Syihan Auzani - Eng Programming - DTM FTUI 2021
Photo by Unknown Author is licensed under CC BY-SA
10
Your first program
v0 = 5;
import matplotlib.pyplot as plt
g = 9.81;
import numpy as np
t = linspace(0, 1, 1001);
g=9.8
y = v0*t - 0.5*g*t.^2;
v0=5
plot(t, y);
t = np.linspace(0,1,1001)
xlabel("t (s) ");
y = v0*t-0.5*g*t**2
ylabel(’y (m) ");
plt.plot(t,y)
plt.show()