-1
이것은 스크립트의 일부가 아닙니다. 코드를 실행하면 루프가 끝날 때까지 모든 것이 원활하게 실행됩니다. 그런 다음 정의 된 '끝'오류가 있습니까 ?? 왜 이렇게, 왜 그것을 고칠 수 있습니까?온도 변환 (루프 5 회)
감사합니다,
# convert.py
# A program to convert Celsius temps to Fahrenheit by: Samuel Sikes
print("This program converts Celsius to Farenheit")
def main():
for i in range(5):
celsius = eval(input("What is the Celsius temperature? "))
fahrenheit = 9/5 * celsius + 32
print("The temperature is", fahrenheit, "degrees Fahrenheit.")
end
main()
무엇을해야할까요? ** 당신이 원한다면 int로 변환하거나 float을 사용하지 말아야 ** –
파이썬은 닫는 키워드로 블록을 끝내지 않는다. 그 끝을 제거하라. – Jubobs