Else if loop with try
<p>So i am trying to create a set of validation for user inputs in which the input box must have an input entered and be a positive integer greater than 0. I get syntax errors around the elif parts, any help on how to format this correctly would be helpful </p>

<pre><code>def MDConfirm_btn_clicked(self,MGStudent_drop):
   ##Max marks input
   Max_marks=(self.MDMax_inp.text())

   if len(str(Max_marks))==0: #check if length is the same as 0
       Presence_error_open.show()#call presence error prompt if condtion is met

   elif: 
      try:   
        Max_marks=int(self.MDMax_inp.text()) #take input from maximim  marks entry  
      except ValueError:#if python detects error in value type flag error
          Char_error_open.show()       

   elif int((Max_marks)) &lt;=0: #check is value is less than 0
      Char_error_open.show()

   else:
       Max_marks=m1
</code></pre>