+1 (315) 557-6473 

Create A Program to Implement Greeting Function in Python Assignment Solution.


Instructions

Objective
Write a python assignment program to implement greeting function.

Requirements and Specifications

program to implement greeting function in python

Source Code

# your name

# EA_3

# CHAPTER 6

# 1. Write a function called greeting that just prints the following: Hello, how are you? (2 pts.).

def greeting():

print("Hello, how are you?")

# 2. Write a statement to call the greeting function (1 pt.).

greeting()

# 3. Write a function named subtract_seven. The function should accept one argument and

# print the sum of the argument minus 7 (2 pts.).

def subtract_seven(x):

# Print the number x minust 7

print(x-7)

# 4. Write a statement to call the subtract_seven function passing in an argument of 32 (1 pt.).

subtract_seven(32)

# 5. Write a statement to call the three_args function passing in a value of 4 that will be assigned to parameter a,

# a value of 12.1 that will be assigned to parameter b, and a value of -3 that will be assigned to parameter c.

# Save the returned answer in a variable named returned_value. Print returned_value (4 pts.).

def three_args(a, b, c): # DO NOT DELETE OR UPDATE THIS FUNCTION

answer = a + b * c # DO NOT DELETE OR UPDATE THIS FUNCTION

return answer # DO NOT DELETE OR UPDATE THIS FUNCTION

# Call function

returned_value = three_args(4, 12.1, -3)

print(returned_value)