0
default arguement ?
I keep getting an error for this code def greet (name, age= 29): print('hello' + name +' , I am' + age) greet ('max')
2 Antworten
+ 7
Works fine
def greet (name, age= 29):
print('hello ' + name +' , I am', age)
greet ('max')
Since you were adding "am"(string)+age(int) it was giving a Typeerror
+ 3
def greet (name, age= 29):
print('hello' + ' I am' + str(age))
greet ('max')