Python if question

Asked 2 years ago, Updated 2 years ago, 90 views

I am developing a simple text game as a hobby

Whether you're going out hunting or resting, you're going to divide the choices by numbers 1 and 2 through the if statement I don't know if it's because it hasn't been long since I developed it I'd appreciate it if you could give me some advice

if A==1:
    print("Start Hunting!!")// Select 1 to start hunting

    else A==2:
    If print("Let's take a break")//2 is selected, take a break

python if-else

2022-09-20 10:43

1 Answers

You don't have a condition on the else statement.

Study grammar first as someone else told you.

# More than 2 conditions
if 123:
elif 123:
 The condition is 1 and the result is 2
if 123:
else:


2022-09-20 10:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.