Question: Create a file called basic_functions.py. In that file, write the following 3 functions: 1: multiply that takes in two numbers and returns their product. For

Create a file called basic_functions.py. In that file, write the following 3 functions:

1: multiply that takes in two numbers and returns their product. For example, multiply(5, 10) should return 50.

2: hello_name that takes in someone's name (a string) and returns "Hello, [Name]!". If no string is passed, return "Hello, you!". For example, hello_name("Akbar") should return Hello, Akbar! and hello_name() should return Hello, you!.

3: less_than_ten that takes in a list of numbers and returns only the numbers that are less than 10. For example, less_than_ten([1, 5, 81, 10, 8, 2, 102]) should return [1, 5, 8, 2].

For this problem, only write functions (there is no need to write a if __name__ == "__main__"section).

and in addition

Create a file called hello_you.py. In that file, write the following function:

1: hello_name which should be identical to hello_name from Problem 1.

Then, create a if __name__ == "__main__" block that takes in a name as a command line argument. and then prints "Hello, [Name]!". For example, running ./hello_you.py Jack should print "Hello, Jack!" to the terminal. Running just ./hello_you.pywithout any arguments should print "Hello, you!".

Example Output

./hello_you.py Yoda ## Hello, Yoda! ./hello_you.py ## Hello, you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!