r/pythonhelp • • Aug 20 '21

Can you help me with my function?

Post image
2 Upvotes

4 comments sorted by

View all comments

2

u/robohobo- Aug 21 '21

As mentioned earlier use isdigit() to check if input is an int.

You're using x and name interchangeably just take out x altogether and put name as function parameter

I prefer f strings for formatting Print(f"name is {name}....")