Required
1. In this assignment, you are to write codes that generate a unique password for different websites.
2. The rules are as follows:
Assume the website url address is โ€œhttp://www.google.comโ€,
Rule 1: Write codes to remove โ€œhttp://www.โ€ as this part is same across any websites.
Rule 2: For the same reason, write codes to remove โ€œ.comโ€. At this point, what you are left with is the unique website name (usually the name of a company, โ€œgoogleโ€, in our example)
Rule 3: Create a variable and write codes to extract the first three characters of the website name. In our example, the first three characters are โ€œgoo.โ€
Rule 4: Create a variable and write codes to count the number of characters of the website name. In our example, the number of characters is 6 (g, o, o, g, l, e).
Rule 5. Create a variable and write codes to count the number of letter โ€œeโ€ in the unique website name. In our example, we only have one instance of โ€œeโ€ in โ€œgoogleโ€.
Rule 6. Create a variable and write codes to concatenate the outputs of Rule 3, Rule 4, Rule 5, and also add โ€œ!โ€ at the end.
Rule 7. After creating the variable containing the unique password, print the following statement: โ€œThe unique password for website url address is: unique password!โ€In case of โ€œhttp://www.google.com,โ€ the output statement would look like as the follows: โ€œThe unique password for http://www.google.com is: goo61!โ€
If the url address is โ€œhttp://www.youtube.com,โ€ the output statement would look like as the follows: โ€œThe unique password for http://www.youtube.com is: you71!โ€
3. Once you write codes, copy and paste them onto MS word doc. Do NOT screenshot the codes.
Suggestions
1. Begin by creating a variable (url)
url = โ€œhttp://www.google.comโ€
2. Then, write codes to satisfy the rules. For example, you are to write codes to remove โ€œhttp://wwwโ€ to satisfy Rule 1.
3. Make sure that you write codes in detail so that anyone without Python background can run your codes by copying and pasting onto Visual Studio Codes. For example, if a package is required to run your code, you are to include the codes that import necessary packages. If directions/instructions are required when running your codes, include the directions/instructions hashed out.

The post Required
1. In this assignment, you are to write codes that generate a unique pa
appeared first on Scholars Hub Blog.