title: Programming practice: the price of laptops list problem
body: <p>This is the question that given to me</p>
  <blockquote>
  <p>One day Sindakht and Irsa were discussing the price of laptops and their quality. Sindakht guesses that the more expensive a laptop is, the better the quality. But Irsa claims that she can find 2 laptops whose price is lower than the first, but its quality is higher than the second, and she can refute Sindakht's guess. Now you have to write a program to help Irsa investigate her claim.</p>
  <p>N laptop specifications will be given to you. The first input line contains the number n, which indicates the number of laptops. Each of the next n lines contains two numbers, the first of which indicates the price of the laptop and the second of which indicates the quality of the laptop. If you can find two laptops that meet the conditions stated by Irsa, print happy irsa, otherwise print poor irsa (please note the lower case letters, all letters are written in lower case).</p>
  <p>Sample input:</p>
  <pre><code>2 
  1 10 
  7 3
  </code></pre>
  <p>Sample output:</p>
  <pre><code>happy irsa
  </code></pre>
  <p>At the input of the sample, the first laptop is priced at 1 and the quality is 10 (the higher the number, the higher the quality). The second laptop is priced at 7 and the quality is 3. Well, Irsa has managed to find two laptops, which although the price of the latter is higher than the price of the first, but the quality of the latter is lower than the quality of the first.</p>
  <p>Sample input:</p>
  <pre><code>4 
  1 5 
  7 9 
  5 6 
  20 30
  </code></pre>
  <p>Sample output:</p>
  <pre><code>poor irsa
  </code></pre>
  </blockquote>
  <p>and I try this Anyone can help me to make it Right</p>
  <pre><code>n=int(input())
  computer=[]
  
  for m in range(n) :
      laptop=input()
      laptop=laptop.split()
      computer.append(laptop)
  
  for i in range(n) :
      for j in range(2):
          computer[i][j]=int(computer[i][j])
  
  for i in range(n+1) :
      if computer[i][0] &lt; computer[i+1][0] and computer[i][1] &gt; computer[i+1][1] :
          print(&quot;happy irsa&quot;)
          break
      else:
          print(&quot;poor irsa&quot;)
          break
  </code></pre>