91.6k views
4 votes
In Python, you can specify default arguments by assigning them a value in the function definition.

In Python, you can specify default arguments by assigning them a value in the function-example-1

1 Answer

1 vote

Answer:

use the input function to ask them their name like name = input(" enter name?: ") or

def greet(name, msg):

# This function greets to the person with the provided message

print("Hello", name + ', ' + msg)

greet("Andy", "Good morning!")

def greet(name, msg="Good morning!"):

# This function greets to

the person with the

provided message.

If the message is not provided,

it defaults to "Good

morning!

print("Hello", name + ', ' + msg)

greet("Kate")

greet("Bruce", "How do you do?")

Step-by-step explanation:

it's one of these three but not sure

User Bao Nguyen
by
5.6k points