樣本程式提供給你參考:
for i in range(1,4): print('A'*i) print('\n') c=10 for i in range(1,4): print(' '*(c-(i+1))+'A'*(2*i-1)) |
A AA AAA A AAA AAAAA |
樣本程式提供給你參考:
import matplotlib import matplotlib.pyplot as plt import numpy as np plt.figure() plt.axis('equal') x0,y0=0,0 R=1 t=np.linspace(0,2*np.pi,20) x=x0+R*np.cos(t) y=y0+R*np.sin(t) plt.plot(x,y) |
|
![]() ![]() |
![]() ![]() |
![]() |