안녕하세요. 제곱계산기 만드는 중인데 문법적 오류가 떠요.
조회수 993회
def divided_by(x,y):
return x**y
def main():
under_input = float(input("밑값을 입력하시오."))
exponential_input = float(input("지수값을 입력하시오."))
if exponential_input is (1 > exponential_input)
print("지수값을 재입력 해 주시오.(1보다 큰 실수만 가능)")
위 코드까지만 작성하고 파이썬 돌렸는데
RESULT
내용 삭제
실행 중 오류가 발생했습니다.
File "/solution.py", line 9
if exponential_input is (1 > exponential_input)
^
SyntaxError: invalid syntax
이렇게 떠요. 도와주세욥
-
(•́ ✖ •̀)
알 수 없는 사용자 - 〉
1 답변
-
1번
def divided_by(x,y): return x**y def main(): under_input = float(input("밑값을 입력하시오.")) exponential_input = float(input("지수값을 입력하시오.")) if 1 > exponential_input : print("지수값을 재입력 해 주시오.(1보다 큰 실수만 가능)")
2번
//def divided_by(x,y): return x**y def main(): under_input = float(input("밑값을 입력하시오.")) exponential_input = float(input("지수값을 입력하시오.")) if exponential_input is (1 > exponential_input) : print("지수값을 재입력 해 주시오.(1보다 큰 실수만 가능)")
3번
def divided_by(x,y): return x**y x = int(input('Input x : ')) y = int(input('Input y : ')) while y < 1 : y = int(input('Input y : ')) print divided_by(x,y)
-
(•́ ✖ •̀)
알 수 없는 사용자
-
댓글 입력