Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

debug my code follwong the instruction anf troubleshoot plz python In this lab, you will practice - writing a function to match the specifications -

debug my code follwong the instruction anf troubleshoot plz
python image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
In this lab, you will practice - writing a function to match the specifications - using string concatenation or f-strings 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 beiow). 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 outpul as shown below. Troubleshooting - If you are getting Assert ionError make sure that your create_password() function is returning the correct value. - If you are falling 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 right value, but the function create_password ( ) is not creating/returning the correct value. Function works incorrectly. Test feedback If there are no other errors, then check it's name, the parameters and return values. 4.Unit test 0/3 create.password(Rocky, 7) Funcfion works incorrectly. Test feedback If there are no other errors, then check it's name, the parameters and return valuos. 5.Unit test A 0/6 Random parameters as input Function works incorrectly. Test feedback. If there are no other errors, then check 1ts name, the parameters and return values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

4. Devise an interview strategy from the interviewers point of view

Answered: 1 week ago