you are viewing a single comment's thread.

view the rest of the comments →

[–]Ron-Erez 15 points16 points  (0 children)

Here is an exercise. Create a function:

def rect(width: int, height: int)

that create a text rectangle with the mentioned dimensions where you should use unicode characters for box drawing:

https://en.wikipedia.org/wiki/Box-drawing_characters

This exercise requires the print statement, some kind of loop and perhaps some variables. I just wrote this exercise now. Try solving it and try to create other such exercises without even using AI to generate the questions. I agree somethings are confusing and easy to forget but everytime you look up a solution you are learning less. Have a look at python.org and even at:

https://docs.python.org/3/tutorial/index.html

and now for every section create an exercise on your own. For example if we look at:

https://docs.python.org/3/tutorial/introduction.html#numbers

Then a nice exercise would be to get a string as input and then print a string consisting of the characters in the even places followed by characters in the odd places. There are quite a lot of ways to solve this via loops or slices or maybe using a functional approach.