title: how can i write a python code for give row and column and print 10101 and 01010 pattern
body: <p>i want to write a python code for give row and column from input and print a pattern like this photo:<br />
  <a href="https://i.stack.imgur.com/t30e0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t30e0.png" alt="enter image description here" /></a></p>
  <p>i write this code but this just show 10101 :</p>
  <pre><code>rows = int(input(&quot;Please Enter the total Number of Rows  : &quot;))
  columns = int(input(&quot;Please Enter the total Number of Columns  : &quot;)) 
  for i in range(1, rows + 1):
  for j in range(1, columns + 1):
      if(j % 2 == 0):          
          print('0', end = '  ')
      else:
          print('1', end = '  ')
  print()
  </code></pre>
  <p>thanks for your attention...☺♥</p>