0
How can I put an input() statement inside a function that will be called only when the said function is also called.
6 Respostas
+ 1
An example if you have function called gretting with one parameter
def gretting(name):
print("Hello", name)
gretting (input ())
+ 1
David Boateng
An example if you have function called gretting with two parameters
def gretting(name,age):
print("Hello", name,"your age is", age)
gretting (input (), input ())
+ 1
You're welcome
0
Awesome thanks
0
Buh please what if you want to add two input statements where you will need to rep both with a variable which is only called after the function is called?
0
Cool. Thanks