Question: LAB 6 . 2 8 . 1 : Lab 3 , Part 1 : Using functions to create passwords 2 ways ACTIVITY Write two different

LAB
6.28.1: Lab 3, Part 1: Using functions to create passwords 2 ways
ACTIVITY
Write two different password creation functions, password10 and password20. We put the first few characters of the header of each in the template for you. Write both of them below.
password1() has 2 input arguments, intended to be two strings s1 and s2
password2() has 3 input arguments, again intended to be two strings s1 and s2, and in the third position a number, n.
Function password1 will return (not print) a string consisting of the two strings separated by an underscore character. Function password2 will return a 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 str0. For example, str (2+3) will return '5'
If your functions work correctly you would have:
password1('yellow', 'Rose')
yellow Rose
password2('yellow', 'Rose', 42)
42 yellowRose 42
#Remember: We expect that every function you write for CS 113 will have a docstring in the proper place. You will get most of the points for this assignment from the autograder checking that your program behaves correctly, but some points will come from the TA's checking that the docstrings are there.
Suggestion Work on password 1 first, and run with just password 1 in the window below, and work on it until password1 gets full marks on the first three test cases. When you are doing that, you should expect to see a message telling you that you are getting 0 points for the last four test cases.
Run
Reset Lab Tutorial
 LAB 6.28.1: Lab 3, Part 1: Using functions to create passwords

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!