0

functions in python HELP!

my_name=input("What's your name") def some_name(): print(my_name + "!") my_name() it shows an error

7th May 2018, 9:35 AM
sovietcat
sovietcat - avatar
2 ответов
+ 14
You are trying to call a string. You should be calling the function. This works: my_name=input("What's your name") def some_name(): print(my_name + "!") some_name()
7th May 2018, 9:47 AM
David Ashton
David Ashton - avatar
+ 2
David Ashton lol thx sry didnt notice
7th May 2018, 10:44 AM
sovietcat
sovietcat - avatar