title: Write a program to find the greatest number in a list using python?
body: <p>My solution is:</p>
  <pre><code>numbers = [1, 2, 3, 5, 9, 6, 101, 55, 7, 1, 3, 88, 99, 101, 6, 88, 66, 101, 6, 101, 55, 1001]
  n = len(numbers)
  for x in range(n):
      y = 0
      while y &lt; n:
          if numbers[x] &gt;= numbers[y]:
              y += 1
          else:
              break
      else:
         z = x
  print(f'Greatest number = {numbers[z]}')
  </code></pre>
  <p>I know it's complicated but is it right?
  And one more thing --- Even though I am getting my answers correct for every list of numbers i can make but pycharm is showing a warning that -- Name 'z' can be undefined.
  why is that and how can I remove it//</p>