Sep-21-2022, 01:45 PM
Hi,
I have 2 if loops to be executed based on input from user, but only 1 loop works at a time even if the condition satisfices, I had to comment out the other loop in order to work.
Is it indentation causing any issues here?
I'm
I have 2 if loops to be executed based on input from user, but only 1 loop works at a time even if the condition satisfices, I had to comment out the other loop in order to work.
Is it indentation causing any issues here?
I'm

x = input("Please enter the value for x:") y = input("Please enter the value for y:") if(x == 10 and y == 30): body; else: print('I'm sorry, your wrong') if (x == 40 and y == 50): body; else: print('I'm sorry, you entered x as 70)