Question: 1. Check System Requirements a. Check the system requirement to know whether your computer supports IDLE. b. Download and Install IDLE (Refer to Python Installation

1. Check System Requirements a. Check the system requirement to know whether your computer supports IDLE.

b. Download and Install IDLE (Refer to Python Installation Lab)

2. H4ch3r Sp34k. Create a function that takes a string as an argument and returns a coded (h4ck3r 5p34k) version of the string.

Your code must accept user input and produce a printed output statement.

Examples: hacker_speak("javascript is cool") "j4v45cr1pt 15 c00l"

hacker_speak("programming is fun") "pr0gr4mm1ng 15 fun"

hacker_speak("become a coder") "b3c0m3 4 c0d3r"

Notes:

In order to work properly, the function should replace all "a"s with 4, "e"s with 3, "i"s with 1, "o"s with 0, and "s"s with 5.

Hint:

Python string method replace() returns a copy of the string in which the occurrences of old have been replaced with new, optionally restricting the number of replacements to max.

Syntax: Following is the syntax for replace() method str.replace(old, new[, max])

Parameters: old This is old substring to be replaced. new This is new substring, which would replace old substring. max If this optional argument max is given, only the first count occurrences are replaced.

3. Hiding the Card Number Write a function that takes a credit card number and only displays the last four characters. The rest of the card number must be replaced by ************.

Your code must accept user input and produce a printed output statement.

Be sure to include input validation condition into your program.

Examples: card_hide("1234123456785678") "************5678"

card_hide("8754456321113213") "************3213"

card_hide("35123413355523") "**********5523"

Notes:

Ensure you return a string. The length of the string must remain the same as the input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!