title: Python program to determine whether a password meets all the requirements for a secure password
body: <p>I need help with my coding. Some of it is incorrect and I am not sure where to begin. Here is what is required in my program. &quot;Writing a Python program to determine whether a password meets all the requirements for a secure password. Your program should prompt the user for the candidate password and output either that the password is valid or the reason it is invalid. To be valid the length of the password must greater than some minimum length but less than some maximum. It must not include the substring &quot;umgc&quot; in any combination of upper or lower case letters. Finally, it must contain the # symbol in some position other than the first or last character. You should decide on the minimum and maximum allowable lengths.&quot;</p>
  <pre><code>password=input(&quot;Enter password:&quot;)
  if 'u''m''g''c' in password:
      print('invalid')
  elif len &lt;=1:
      print('invalid')
  elif len &gt;=4:
      print('invalid')
  else password[0:3])
      print('valid')
  </code></pre>