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?

Discussions

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 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: Having trouble with a code for class - Stack Overflow
Prompt: 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 &q... More on stackoverflow.com
🌐 stackoverflow.com
WGU Learn Python 6.15.1: LAB: Password modifier
This password == password + word[i] should be password = password + word[i] More on reddit.com
🌐 r/learnpython
6
8
May 27, 2022
🌐
Studocu
studocu.com › southern new hampshire university › intro to scripting › lab 4.15 - it 140: password modifier instructions & details
LAB 4.15 - IT 140: Password Modifier Instructions & Details - Studocu
March 28, 2024 - simple password and makes it stronger by replacing characters using the key below, and by ... Hint: Python strings are immutable, but support string concatenation.
🌐
Essay Nerdy
boutsolutions.com › ExpertAnswers › python-please-5-15-lab-password-modifier-many-user-created-passwords-are-simple-and-easy-to-guess-wr
Solved: PYTHON PLEASE 5.15 LAB: Password modifier Many use | essaynerdy.com
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. . • i becomes 1 a becomes @ m becomes M • B becomes 8 s becomes $ . Ex: ...
🌐
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 - Write a program that takes a simple · password and makes it stronger by replacing characters using the key below, and by appending · "q*s" to the end of the input string. i becomes !
🌐
Assignmentcache
assignmentcache.com › cby-130-week-3-python-lab-4-15-password-modifier.html
CYB/130 Week 3 Python LAB 4.15: Password modifier
Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string. i becomes ! a becomes @ m becomes M B becomes 8 o becomes . Ex: If the input is: mypassword the output is: Myp@ssw.rdq*s · ...
🌐
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 - Module Two: Enhancing Python Programming with PyCharm Features · IT-140 Module 4 - Pseudocode for Number Guessing Game · IT 140: Project Storyboard for Scoo Doo Mystery Adventure · IT 140: Module Two Assignment - Exploring PyCharm Features · Week4project - This is an assignment for script · 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!
Find elsewhere
🌐
YouTube
youtube.com › watch
Python Lab Password modifier - YouTube
LAB: Password modifierPythonMany user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by r...
Published: March 2, 2024
🌐
Studocu
studocu.com › southern new hampshire university › intro to scripting › lab 4.15: python password modifier and character count activities
LAB 4.15: Python Password Modifier and Character Count Activities - Studocu
October 19, 2024 - EX: IT the input IS: mypassword the output is: Hint: Python strings are immutable, but support string concatenation. Store and build the stronger password in the given password variable. 599554 qx3zqy7 LAB ACTIVITY 4.15: LAB: Password modifier main Load default template 1 word input ( ) 2 password I 3 4 word word. replace 5 word word.
🌐
EduBirdie
edubirdie.com › home › eastern kentucky university › csc 210 | data structures and programming. › 4.15 lab password modifier
4.15 Lab Password Modifier - Edubirdie
Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string. i becomes ! a becomes @ m becomes M B becomes 8 o becomes . Ex: If the input is: mypassword the output is: Myp@ssw.rdq*s Hint: ...
🌐
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 - Q: What is the 4.15 Lab Password Modifier? A: The 4.15 Lab Password Modifier is a Python program that allows users to enhance the security of their passwords by modifying them through various customization options.
🌐
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 - ... 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 "q*s" to the end of the input string. ... Hint: Python strings are immutable, but support string ...
🌐
Chegg
chegg.com › engineering › computer science › computer science questions and answers › 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
Solved 5.15 LAB: Password modifierMany user-created | Chegg.com
May 15, 2024 - 5 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. ibecomes · 1 · a becomes @ mbecomes M · B becomes · 8 · s becomes $ Ex: If the input is: mypassword · the output is: Mype$$word! Hint: Python strings are immutable, but support string concatenation.
🌐
AssignmentCache
assignmentcache.com › home › sof › python › cyb130 object-oriented scripting language › cyb/130 week 3 python lab 4.15: password modifier
CYB/130 Week 3 Python LAB 4.15: Password modifier - AssignmentCache
December 31, 2023 - Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending “q*s” to the end of the input string. i becomes ! a becomes @ m becomes M B becomes 8 o becomes .
🌐
Course Hero
coursehero.com › tutors-problems › Python-Programming › 33794302-415-LAB-Password-modifier-Many-user-created-passwords-are-simple
[Solved] 4.15 LAB: Password modifier Many user-created ...
September 25, 2021 - Instant access to millions of Study Resources, Course Notes, Test Prep, 24/7 Homework Help, Tutors, and more. Learn, teach, and study with Course Hero. Get unstuck.
🌐
Panel Essays
read.donepapers.com › home › 2022 › june › 22 › 3.15lab: password modifier many user-created passwords are simple...
3.15LAB: Password modifier Many user-created passwords are simple… - Panel Essays
June 22, 2022 - 3.15 LAB: Password modifierMany user-created passwords are simple and easy to guess Code 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.i becomes 1a becomes @m becomes MB becomes ...
🌐
Scribd
scribd.com › document › 480691759 › 4-15-LAB-Password-modifier-docx
4.15 LAB Password modifier.docx
Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string.  i becomes !
Rating: 1 ​ - ​ 4 votes