Page not loading? Try clicking here.
Placeholder

#831
Language restricted

반복제어문 1 - 형성평가 5 1s 16MB

Problems

삼각형의 밑변의 길이와 높이를 입력 받아 넓이를 출력하고,

"Continue?"에서 'Y'나 'y'를 입력하면 작업을 반복하고 다른 문자를 입력하면 종료하는 프로그램을 작성하시오. 

(넓이는 반올림하여 소수 첫째 자리까지 출력한다.)

 

길이와 높이는 정수로 주어진다.


Example

Width = 11
Height = 5
Triangle Area = 27.5
Continue? Y
Width = 10
Height = 10
Triangle Area = 50.0
Continue? N

"Width = ", "Height = ", "Continue? " 는 input()의 프롬프트


Source

자기주도 파이썬

You must sign in to write code.