Advertisement
Guest User

new

a guest
May 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #Q1.底辺と高さをキー入力させ、三角形の面積結果を表示させよ。
  2.  
  3. x = input(print("Please fill in the base value of the triangle.\n-->"))
  4. print ("The base = " + str(x) + "[cm]")
  5.  
  6. h = input(print("Please fill in the height value of the triangle.\n-->"))
  7. print ("The height = " + str(h) + "[cm]\n")
  8.  
  9. a = int(x) * int(h) / 2
  10.  
  11. print ("The area of a triangle = " + str(a) + "[cm2]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement