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?
Top answer 1 of 2
3
This password == password + word[i] should be password = password + word[i]
2 of 2
3
In your top code you have the following error else: password == password + word[i] ^^ Also your thing is horrific, convertor = { 'i': "1", 'a': "@", 'm': "M", 'B': "8", 's': "$" } encrypted_word = "".join([ convertor[letter] if letter in convertor.keys() else letter for letter in word ])
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.15LAB: 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 ·
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
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
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
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
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.
CliffsNotes
cliffsnotes.com › questions & answers › python programming › python. 5.15 lab: password modifier many user-created passwords are simple and easy to guess. write a program that...
[Solved] Python. 5.15 LAB: Password modifier Many user-created passwords are simple and easy to guess. Write a program that... | CliffsNotes
June 20, 2023 - Python. 5.15 LAB: Password modifier Many user-created passwords are simple and easy to guess.
Top answer 1 of 7
2
You can use str.translate and str.maketrans
>>> s = 'mypassword'
>>> s.translate(s.maketrans('iamBo', '!@M8.'))
'[email protected]'
2 of 7
0
You can also harcode the shifting letters. Answers below are better but you can go like:
new_pass = ''
for char in password:
if char == 'i':
new_pass += '!'
elif char == 'a':
new_pass +='@'
elif char == 'm':
new_pass +='M'
.
.
.
else:
new_pass += char
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.
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 <len(word) : 6 if word[i] == 'i': 7 password += 8 elif word[i] == 'a': 9 password += '@' 10 elif word[i] == 'm': 11 password += 'M' 12 elif word[i] == 'B' : 13 password += '8' 14 elif word[i] == 'o': 15 password += 16 else: 17 password += word[i] 18 i=i+1 19 20 password = password + 'q*s' 21 22 print (password) 23 Indentations matter!
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
Chegg
chegg.com › homework-help › questions-and-answers › 515-lab-password-modifier-many-user-created-passwords-simple-easy-guess-write-program-take-q89889712
Chegg Study Questions and Answers | Chegg.com
Ask any question and get an answer from our subject experts in as little as 2 hours.
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
Bartleby
bartleby.com › bartleby textbook solutions › engineering q&a and textbook solutions › computer science q&a, textbooks, and solutions › computer science q&a library › 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 "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: python strings are immutable, but support string concatenation. store and build the stronger password in the given password variable.
Answered: 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… | bartleby
September 25, 2021 - 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 "q*s" to the end of the input string. i becomes ! a becomes @ m becomes M B ...
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*