Write My Paper Button

WhatsApp Widget

Required 1. In this assignment, you are to write codes that generate a unique pa

Share this post on:

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.

Share this post on:

Affordable and Dependable Platform for Your Academic Assignments

X