解答例
1 2 3 4 5 6 7 8 9 10 11 |
def triangle(teihen,takasa): ans = teihen * takasa / 2 return ans tmp = input("底辺:") x = int(tmp) tmp = input("高さ:") y = int(tmp) z = triangle(x,y) print(z) |
1 2 3 4 5 6 7 8 9 10 11 |
def triangle(teihen,takasa): ans = teihen * takasa / 2 return ans tmp = input("底辺:") x = int(tmp) tmp = input("高さ:") y = int(tmp) z = triangle(x,y) print(z) |