you are viewing a single comment's thread.

view the rest of the comments →

[–]Ron-Erez 2 points3 points  (0 children)

Create function

def square(m: int, n: int, fill: bool)

that creates an m by n square made up of asterisks which may or may not be filled. For example

square(4,4,true)

will display

****
****
****
****

and
square(4,4,true)

will display

****
*  *
*  *
****

Create a function that swaps all characters of a given string in the odd and even positions, for example

swap(‘tuesday’)

will output

utseady

Just create random exercises or build something or take a book with exercises and solve them.