Good Paragraph How would you make a code that modifies a password to have: į becomes 1 a becomes @ • m becomes M This is what I have so far but it just keeps giving a blank output: word=input() password=" for e in word: if c B becomes 8 s becomes $ r='T if c === 'a': if c == 'm': r="M if == 'B': r="8¹ if c == 's': r='S' else: r=c password=password+ print() (Ctrl) Styles 27

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
W
File
AutoSave
Paste
Home
X
Clipboard
Page 1 of 1
Off H✓ ✓ Document1 - Word
Insert Draw Design Layout References Mailings
A^ˆ A
A
Aa A
66°F
Cloudy
Times New Roman ✓12
BIU ab
100 words
8
X
Font
x
Text Predictions: On
Accessibility: Good to go
Review View Help
am ✓ € +
Paragraph
flv
for c in word:
r="
if c == 'i':
r = '1'
if c == 'a':
r = '@'
if c == 'm':
How would you make a code that modifies a password to have:
į becomes 1
a becomes @
Im becomes M
B becomes 8
s becomes $
r = 'M'
if c == 'B':
r='8'
if c == 's':
r = '$'
else:
This is what I have so far but it just keeps giving a blank output:
word=input()
password = "
Search
print()
Q Search
H
¶
r = c
password = password+r
(Ctrl)
Normal
No Spacing
Heading 1
Styles
M
Heading 2
N
Find
Replace
Select
Editing
Dictate
Focus
Voice
Lennox Wilson
Comments Editing
88
Sensitivity Editor Add-ins
Sensitivity Editor Add-ins
Ō
Share
11:50 AM
9/28/2023
X
90%
Transcribed Image Text:W File AutoSave Paste Home X Clipboard Page 1 of 1 Off H✓ ✓ Document1 - Word Insert Draw Design Layout References Mailings A^ˆ A A Aa A 66°F Cloudy Times New Roman ✓12 BIU ab 100 words 8 X Font x Text Predictions: On Accessibility: Good to go Review View Help am ✓ € + Paragraph flv for c in word: r=" if c == 'i': r = '1' if c == 'a': r = '@' if c == 'm': How would you make a code that modifies a password to have: į becomes 1 a becomes @ Im becomes M B becomes 8 s becomes $ r = 'M' if c == 'B': r='8' if c == 's': r = '$' else: This is what I have so far but it just keeps giving a blank output: word=input() password = " Search print() Q Search H ¶ r = c password = password+r (Ctrl) Normal No Spacing Heading 1 Styles M Heading 2 N Find Replace Select Editing Dictate Focus Voice Lennox Wilson Comments Editing 88 Sensitivity Editor Add-ins Sensitivity Editor Add-ins Ō Share 11:50 AM 9/28/2023 X 90%
Expert Solution
Step 1: Providing the algorithm

Input: 

- Prompt the user to input their password and store it in a variable, e.g., "word".

Initialization:
- Initialize an empty string variable, e.g., "password", to store the modified password.

Loop:
- For each character "c" in "word", do the following:
  - If "c" is equal to 'i', replace it with 'l'.
  - Else if "c" is equal to 'a', replace it with '@'.
  - Else if "c" is equal to 'm', replace it with 'M'.
  - Else if "c" is equal to 'B', replace it with '8'.
  - Else if "c" is equal to 's', replace it with '

Output:
- Print the modified "password".

.
  - Otherwise, keep "c" as it is.


Output:
- Print the modified "password".

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education