發表文章
目前顯示的是 5月, 2023的文章
郭怡吟python, input, str, float
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
VS code程式碼 from math import * def abc(r): print("郭怡吟輸入的半徑 " + str(r)) print("圓面積: "+str(pi*r*r)) print("圓周長: "+str(pi*r*2)) print("球體積: "+str(pi*r*r*r*4/3)) print("球表面積:"+str(pi*r*r*4)) def tri(z): print("郭怡吟輸入的度 " + str(y)) print("正弦sin "+str(sin(z))) print("餘弦cos "+str(cos(z))) def group(r, t): abc(r) tri(t) r = float(input("輸入半徑: ")) y = float(input("輸入角度360度單位: ")) t = y/180*pi group(r,t) VS code編輯環境截圖 說明影片