Q:

Python elif statement syntax error

I am new in python programming. I am facing problem on elifstatement. I can't find out the syntax error. My code given below.
for num in range(1,31):  

       if (num%5 == 0) or (num%3 == 0):  

          if (num%3 == 0):
             print ("beep")
             elif (num%5 == 0):
                print ("boop")
             else:
                print ("beepboop")

       else:          

      print (num)

A:

Wrong indent
for num in range(1, 31):
    if (num % 5 == 0) or (num % 3 == 0):
        if num % 3 == 0:
            print("beep")
        elif num % 5 == 0:
            print("boop")
        else:
            print("beepboop")
    else:
        print(num)

