Hello. I'm making a square calculator, but I'm getting a grammatical error.

Asked 2 years ago, Updated 2 years ago, 50 views

def divided_by(x,y):
    return x**y

def main():
    under_input = float("Enter the bottom value.")
    explicit_input = float(input("Enter an exponential value"))
    if exponential_input is (1 > exponential_input)
        print("Please re-enter the index value.(Only mistakes greater than 1)"

I wrote up to the code above and turned the Python.

RESULT
Deletion of content
An error occurred while running. 
File "/solution.py", line 9
if exponential_input is (1 > exponential_input)
^
SyntaxError: invalid syntax

It pops up like this. Help me

python error

2022-09-22 18:26

1 Answers

Number 1

def divided_by(x,y):
    return x**y

def main():
    under_input = float("Enter the bottom value.")
    explicit_input = float(input("Enter an exponential value"))
    if 1 > exponential_input :
        print("Please re-enter the index value.(Only mistakes greater than 1)"

Number 2

//def divided_by(x,y):
    return x**y

def main():
    under_input = float("Enter the bottom value.")
    explicit_input = float(input("Enter an exponential value"))
    if exponential_input is (1 > exponential_input) :
        print("Please re-enter the index value.(Only mistakes greater than 1)"

Number 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)


2022-09-22 18:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.