I've included my code in the picture below. Best of luck. Answer from Cytokine on brainly.com
🌐
Reddit
reddit.com › r/learnpython › wgu learn python 6.15.1: lab: password modifier
r/learnpython on Reddit: WGU Learn Python 6.15.1: LAB: Password modifier
May 27, 2022 -

Strange results. There is a lab where we are to take input and alter the input.

word = input()
password = ''
i = 0

while i < len(word):
    if word[i] == 'i':
        password = password + '1'
    elif word[i] == 'a':
        password = password + '@'
    elif word[i] == 'm':
        password = password + 'M'
    elif word[i] == 'B':
        password = password + '8'
    elif word[i] == 's':
        password = password + '$'
    else:
        password == password + word[i]
    i = i + 1
password = password + '!'
print(password)

This code 'works' but it is dropping the items on in the while loop.

Check this out, the code below works as expected:

word = input()
password = ''
i = 0

while i < len(word):
    if word[i]=='i':
       password +='1'
    elif word[i]=='a':
       password +='@'
    elif word[i]=='m':
       password +='M'
    elif word[i]=='B':
       password +='8'
    elif word[i]=='s':
       password +='$'
    else:
        password += word[i]
    i +=1
password = password + '!'
print(password)

The only difference is using the shorter += way of making a variable equal to itself and the other item.

output from top code is

mypassword

M@$$!

Output from bottom code is

mypassword

Myp@$$word!

:O!!!! What gives? What am I missing?

Help with this password generator May 25, 2023
r/learnpython
3y ago
Password generator code issues. Help! Thanks Aug 20, 2022
r/learnpython
4y ago
Password manager my first python project.. Aug 6, 2024
r/learnpython
2y ago
I made a simple random password generator Mar 14, 2023
r/Python
3y ago
More results from reddit.com
🌐
Studocu
studocu.com › southern new hampshire university › intro to scripting › 4.15 lab password modifier
4.15 LAB Password modifier - 4 LAB: Password modifier Many user-created passwords are simple and - Studocu
August 11, 2022 - 4.15 LAB Password modifier · Academic year · 2022/2023 · Category · Assignments · Report Document · View full document · 4.15LAB: Password modifier · Many user-created passwords are simple and easy to guess. Write a program that takes a simple · password and makes it stronger by replacing characters using the key below, and by appending ·
Discussions

5.15 LAB: Password modifierMany user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "!" to the end of the input string.ibecomes 1a becomes @mbecomes MB becomes 8s becomes $Ex: If the input is:mypasswordthe output is:Mype$$word!Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable.553262.4201248.9×3zqy7LABACTIVITY5.15.1: LAB: Password modifier010main.pyLoad default template...1 word = input() 2 password = '' 3word = input()password =34 '.' Type your code here.
Answer to 5.15 LAB: Password modifierMany user-created More on chegg.com
🌐 chegg.com
1
May 15, 2024
Python. 5.15 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program that...
Ace your courses with our free study and lecture notes, summaries, exam prep, and other resources More on cliffsnotes.com
🌐 cliffsnotes.com
1
June 20, 2023
python - How to change letters in a string entered by the user? - Stack Overflow
I have a python question called the "Password modifier" where a user enters a password of their choice (i.e mypassword) and the program needs to change the following. i becomes ! a becomes @ m bec... More on stackoverflow.com
🌐 stackoverflow.com
5.15 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "!" to the end of the input string. Students: Section 5.15 is a part of 1 assignment ch5zyLabsAssignment i becomes 1 . a becomes @ m becomes M ●
Answer to 5.15 LAB: Password modifier Many user-created More on chegg.com
🌐 chegg.com
1
June 18, 2023
🌐
Scribd
scribd.com › document › 480691759 › 4-15-LAB-Password-modifier-docx
4.15 LAB Password modifier.docx
This document describes a program that takes a simple password as input and makes it stronger by replacing certain characters according to a key and appending "q*s" to the end. The program iterates through each character in the input password, ...
Rating: 1 ​ - ​ 4 votes
Find elsewhere
🌐
Assignmentcache
assignmentcache.com › cby-130-week-3-python-lab-4-15-password-modifier.html
CYB/130 Week 3 Python LAB 4.15: Password modifier
Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable.
🌐
LogMeOnce
logmeonce.com › home › 4.15 lab password modifier: secure your data with ease!
4.15 Lab Password Modifier: Secure Your Data with Ease!
June 16, 2024 - Keeping your lab ⁤passwords secure and up-to-date⁢ is a top priority. With the 4.15 Lab Password​ Modifier, you can easily change your lab passwords in just a few steps. The 4.15 Lab Password Modifier‍ takes all the hassle out of resetting your assigned‌ lab passwords.
🌐
Studocu
studocu.com › southern new hampshire university › introduction to scripting › lab 4.15: password modifier activity - python code implementation
LAB 4.15: Password Modifier Activity - Python Code Implementation - Studocu
July 26, 2024 - LAB 4.15: LAB: Password modifier 10/10 ACTIVITY main Load default template. 1 word = input() 2 password = 3 i 0 4 5 while i &lt;len(word) : 6 if word[i] == &#039;i&#039;: 7 password += 8 elif word[i] == &#039;a&#039;: 9 password += &#039;@&#039; 10 elif word[i] == &#039;m&#039;: 11 password += &#039;M&#039; 12 elif word[i] == &#039;B&#039; : 13 password += &#039;8&#039; 14 elif word[i] == &#039;o&#039;: 15 password += 16 else: 17 password += word[i] 18 i=i+1 19 20 password = password + &#039;q*s&#039; 21 22 print (password) 23 Indentations matter!
🌐
Course Hero
coursehero.com › southern new hampshire university › it › it 140
4.15 LAB Password modifier.pdf - 9/21/22 4:10 PM Section 4.15 - IT 140: Introduction to Scripting 4.15 LAB: Password modifier Many user-created | Course Hero
October 11, 2022 - Write a program that takes asimple password and makes it stronger by replacing characters using the key below, and byappending "q*s" to the end of the input string.i becomes !a becomes @m becomes MB becomes 8o becomes .Ex: If the input ...
🌐
EduBirdie
edubirdie.com › home › eastern kentucky university › csc 210 | data structures and programming. › 4.15 lab password modifier
4.15 Lab Password Modifier - Edubirdie
413612.2342636.qx3zqy7 LAB ACTIVITY 4.15.1: LAB: Password modifier word = input() password = '' word = word.replace('i','!') word = word.replace('a','@') word = word.replace('m','M') word = word.replace('B','8') word = word.replace('o','.') word = word + 'q*s' print(word) Show description
🌐
HatchJS
hatchjs.com › home › 5.15 lab: how to modify your password
5.15 Lab: How to Modify Your Password
January 5, 2024 - In this lab, you will learn how to use the password modifier to change the passwords of users on a Linux system.
🌐
YouTube
youtube.com › watch
Java Lab: Password Modifier - YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new featuresNFL Sunday Ticket · © 2025 Google LLC
Published: December 29, 2020
🌐
HomeworkLib
homeworklib.com › answers › 971024 › 416-lab-password-modifier-many-user-created
4.16 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program... - HomeworkLib
March 9, 2020 - You are to write a function that takes one parameter that is a hash of a password and should return a possible password (a string) that has the same hash. Use python secure hash function sha1 from hashlib module. Hint: brute force method will be more than adequate to the task.
🌐
Course Hero
coursehero.com › southern new hampshire university › it › it 140
Lab 4.15 Password Modifier - IT 140: Introduction to Scripting.pdf - & My library IT 140: Introduction to Scripting home 4.15: LAB: Password | Course Hero
July 21, 2022 - # ELSE IF character equals 'a' change to '@'password+='@'elifcharacter=='m':# ELSE IF character equals 'm' change to 'M'password+='M'elifcharacter=='B':# ELSE IF character equals 'B' change to '8'password+='8'elifcharacter=='o':# ELSE IF character equals 'o' change to '.'password+='.'else:# When symbols do not get replacedpassword+=characterprint(password+'q*s')# Make password stronger by adding "q*s" to the end of# the input stringDevelop modeSubmit modeSubmit for gradingWhat is this?Only show failing testsDownload this submissionView�edback?6789101112131415161718192021&My library > IT 140: Introduction to Scripting home > 4.15: LAB: Password modiSer’zyBooks catalog(Help/FAQ)Shedrick Ellington*