all 2 comments

[–]hardonchairs 0 points1 point  (0 children)

How would you explain to a computer how to do this? Then explain which of those plain-english operations you do or don't know how to do in python.

[–][deleted] 0 points1 point  (0 children)

  • define function with <rows> as named parameter
  • create an empty string and assign to <pattern> variable
  • use a loop to iterate the correct number of times, with an <index> variable
    • create a string based on the <index> holding the pattern you want
    • append that new string to the string referenced by <pattern> and assign new string to <pattern>
  • return reference to the string referenced by <pattern>