Question
Write two different password creation functions, password1() and password2(), each of which has 3 arguments, intended to be 2 strings s1 and s2, and in
Write two different password creation functions, password1() and password2(), each of which has 3 arguments, intended to be 2 strings s1 and s2, and in the third position a number n.
Function password1 will return a string consisting of the two strings separated by an underscore character. Function password2 will returna string consisting of the (characters of) the number n followed by s1 followed by s2 followed by the (characters of) n.
Hint: To convert a number n to a string use the function str(). So, for example, str(2 + 3) will return '5'
So if your functions work correctly you would have:
In [1]: password1("yellow", "Daisy", 6) Out[1]: yellow_Daisy In [2]: password2("yellow", "Daisy", 6) Out[2]: 6yellowDaisy6
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started