Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It says my program has no output, can you help me figure out why and how to fix it? SCENARIO: Many user-created passwords are simple

It says my program has no output, can you help me figure out why and how to fix it?

SCENARIO:

Many user-created passwords are simple and easy to guess. Have 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 givenpasswordvariable.

MY CODE:

word = input()

password = ''

for x in word:

if (x=='i'):

password+='!'

elif(x=='a'):

password +='@'

elif(x=='m'):

password +='M'

elif (x=='B'):

password+='8'

elif (x=='o'):

password+='.'

else:

password +='x'

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Unity From Zero To Proficiency Beginner A Step By Step Guide To Coding Your First Game

Authors: Patrick Felicia

1st Edition

1091872023, 978-1091872028

More Books

Students also viewed these Programming questions

Question

2. What kinds of passengers would be the most likely to make calls?

Answered: 1 week ago

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago

Question

Explain the testing process of accounting 2?

Answered: 1 week ago