Texts: I need help with this. Create a Python file named hw3c.py. Include a greet() function that does not take parameters or return a value. The greet() function is to print a "Hello World!" message. Include an add() function that takes two parameters, num1 and num2, and adds them. The call of the add() function is to send the values of 4 and 5 as positional arguments. Include a city_country() function that takes two parameters, a city name and the country it's in. The city_country() function returns a string formatted like this: "Santiago, Chile". Call the city_country function multiple times (at least 3x) with different city/country info. Take a look at the code below (also available in the formatted_name.py file), analyze it, run it, and ensure you understand how it works. As you analyze the code, take notes on the order in which the code executes (by line reference) and what each line does. Let me get you started: "The code starts executing at line 10, where the get_formatted_name() function is called and sends two arguments. These arguments are then sent to the function definition on line 2 and received as...." (continue the code execution explanation). Include the code above in your hw3c.py file and comment the file, as expected for this course (see previous assignments). THIS IS WHAT IS INSIDE THE FILE (Formatted_name.py) Submit: A document with your explanation from step 9 plus the usual table showing your code on the left and your output on the right. The hw3c.py file.
C:UsersstanlDownloadsformatted_name.py
get_formatted_name
1
def get_formatted_name(first_name, last_name, middle_name=''):
3
if middle_name:
full_name = f"{first_name} {middle_name} {last_name}"
else:
full_name = f"{first_name} {last_name}"
return full_name.title()
4
5
6
7
8
9
musician = get_formatted_name('jimi', 'hendrix')
print(musician)
10
11
12
13
musician = get_formatted_name('john', 'hooker', 'lee')
print(musician)