Oi, estou aprendendo Python pelo livro How to Think Like a Computer Scientist, e no capítulo 3 - Funções tem um exercíco que eu não consegui fazer: ----------------------------------------------------------------------------------------- Fill in the body of the function definition for cat_n_times so that it will print the string, s, n times: def cat_n_times(s, n): <fill in your code here> Save this function in a script named import_test.py. Now at a unix prompt, make sure you are in the same directory where the import_test.py is located (ls should show import_test.py). Start a Python shell and try the following: >>> from import_test import * >>> cat_n_times('Spam', 7) SpamSpamSpamSpamSpamSpamSpam If all is well, your session should work the same as this one. Experiment with other calls to cat_n_times until you feel comfortable with how it works. --------------------------------------------------------------------------------------------- Tentei algo como: def cat_n_times(s, n): print s * n OU def cat_n_times(s, n): part1 * x part1 = s x = n mas não deu certo, gostaria que alguém me ajudasse se possível.