roberthsu2003 / __2024_05_05_sunday__

AI 人工智慧開發入門_python
30 stars 3 forks source link

練習-請寫一個計算梯形面積的程式碼? #1

Open roberthsu2003 opened 5 months ago

roberthsu2003 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
GraceWCH commented 5 months ago

如下

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
wjoker444116 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
32318140 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
eddie3256 commented 5 months ago

以下

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
jonathan-sean commented 5 months ago

My code

# 梯形面積=(上底+下底)x高/2

t=4.5
b=8
h=3.5
a=(t+b)*h/2
print(str.format("梯形 - 上底: {}, 下底: {}, 高: {}, 面積: {}", t, b, h, a))
Austin20051226 commented 5 months ago
#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
OrbAkatsuki commented 5 months ago

標題

#梯形面積,(上底+下底) * 高 / 2
top = 6.87
bottom = 8.7
height = 7.8

area = (top + bottom) * height / 2
print("梯形面積:",area)
Candace108 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
shadow40744398 commented 5 months ago

梯形面積,(上底+下底)*高/2

top=4.5
bottom=8.0
height=3.5

area=(top+bottom)*height/2
print("梯形面積",area)``
KevinChang00 commented 5 months ago
#梯形面積

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) *height / 2
print("梯形面積:",area)
HYi2520 commented 5 months ago

梯形面積

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
charlywang11 commented 5 months ago

以下是程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:", area)
calvinliao223 commented 5 months ago

以下是我的程式碼


#梯形面積,上底+下底*高/2

top = 4.5
bottom = 8.0
height = 3.5

area = ( top + bottom )* height /2

print( "梯形面積為",area )
Rola0605 commented 5 months ago

以下是我的程式碼

梯形面積,(上底+下底) * 高 / 2

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
TangerineTree0708 commented 5 months ago
#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print ("梯形面積:",area)
linmuxue1120 commented 5 months ago

top = 4.5 bottom = 8.0 height = 3.5

area = (top + bottom) * height / 2 print("梯形面積:",area)

gosh5566 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
minfoung commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
mimionana commented 5 months ago
#梯形面積,(上底+下底) * 高 / 2

top=4.5
bottom=8.0
height=3.5
area=(top+bottom)*height/2

print("梯形面積",area)
Chenhochia commented 5 months ago

以下是我的程式碼

梯形面積,(上底+下底) * 高 / 2 

   top = 4.5
   bottom = 8.0
   height = 3.5

   area = (top + bottom) * height / 2
   print("梯形面積:",area)
thunder114069 commented 5 months ago

梯形面積,(上底+下底) * 高 / 2

top=4.5 high=6 bottom=10 area=((top+bottom)*high)/2 print("梯形面積",area)

stanley940729 commented 5 months ago

程式碼

#梯形面積,(上底+下底) * 高 / 2

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
twmallen02 commented 5 months ago

梯形面積. (上底+下底) * 高/2

top=4.5 bot=8.0 high=3.5

area= (top+bot)*high/2 print("梯形面積:",area)

mimionana commented 5 months ago

梯形面積,(上底+下底) * 高 / 2


top=4.5
bottom=8.0
height=3.5
area=(top+bottom)*height/2

print("梯形面積",area)
sanchangj commented 5 months ago
#梯形面積,(上底+下底) * 高 / 2 

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
Remainder1996 commented 5 months ago

梯形面積,(上底+下底) * 高 / 2

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)
aaaasssddfghjkl commented 5 months ago

梯形面積,(上底+下底) * 高 / 2

top = 4.5 bottom = 8.0 height = 3.5

area = (top + bottom) * height / 2 print("梯形面積:",area)

梯形面積,(上底+下底) * 高 / 2

twmallen02 commented 5 months ago
#梯形面積. (上底+下底) * 高/2

top=4.5
bot=8.0
high=3.5

area= (top+bot)*high/2
print("梯形面積:",area)
sanchangj commented 5 months ago

*``` top=4.5 bottom=8.0 height=3.5 area=(top+bottom)height/2

print("梯形面積",area)

shadow40744398 commented 5 months ago

以下是我的程式碼

#梯形面積,(上底+下底)*高/2

top=4.5
bottom=8.0
height=3.5

area=(top+bottom)*height/2
print("梯形面積",area)``

``

bess122428 commented 4 months ago

這是我的程式碼

#梯形面積,(上底+下底)*高/2
top = 4.5
bottom = 8.0
height = 3.5
area = (top + bottom) * height / 2
print("梯形面積:",area)
EdwardHsu0212 commented 4 months ago

以下是我的程式碼

#梯形面積, 上底+下底 * 高 / 2

top = 4.5
bottom = 8.0
height = 3.5

area = (top + bottom) * height / 2
print("梯形面積:",area)