Why my return statement is not showing any output?
I was trying to solve the following problem: Draw a star pattern that increases in every step (1st step: 1 star, 2nd step: 2 stars). E.g. * ** I am not sure why my code is not showing any output when I am writing return? When I am writing print, it is giving me the star output but also giving me None. May I know why return or print are not working properly? I am using Python 3.7. My code is: def string(inp): for i in range (inp): return i*"*" print (string(5))
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.