Question: please strictly follow the instruction and troubleshoot!thanks python python In this lab, you will practice: - writing a function to match the specifications - using

please strictly follow the instruction and troubleshoot!thanks  please strictly follow the instruction and troubleshoot!thanks python python In this
lab, you will practice: - writing a function to match the specifications
- using string concatenation or fstrings to generate a new string value
- writing the main program to call your function Instructions 1. Write
python
python

In this lab, you will practice: - writing a function to match the specifications - using string concatenation or fstrings to generate a new string value - writing the main program to call your function Instructions 1. Write a function create_password () expects two parameters: pet_name (a string) and fav_number (an integer). The function returns a new password generated using the following pattern: If fav_number followed by the pet_name followed by the star * and fav_number again (see the example below). 2 Create a program that gets a pet name and a favorite number as input from the user, calls the above function, and then prints the output as shown below. Example Input: Angel 3 Output: Your new password is "3Angel.3". Note that the double quotes are part of the output. The asser t in the provided template is checking that this function call is returning the correct value (i.e., a correctly-formed string) assert ereate password ("Ange.", 3)= " 3 Angel 3" Hints - Remember that you cannot directly concatenate an integer and a string - you need to convert an integer into a string using either st r() or by using f-strings. Troubleshooting - If you are getting AssertionError make sure that your create_password() function is returning the correct value. - If you are failing the Unit Tests but passing all of the "Compare Output' tests. make sure that your create_password () function is returning the correct value. This error is likely due to the if _ name _ =-main _ ': block printing the night value, but the function create_password() is not creating/returning the correct value. 3.Unit test ^ 0/3 create_password(Pirate, 8) Your output Test feecback create_password ('pirate', 8); did not return a value. Xour function may be missing a return statement. 4.Unit test 0/3 create_password(Rocky', 7) Your output Test feedback areate password('Rocky', 7) i did not return a value. Your function may be missing a return statement

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!