Computers and Technology, 22.12.2021 23:30 smcardenas02
Validate Password Create a function in Python that will validate a password to make sure that password contains a specific character. This function needs to accept two parameters. The first parameter is a list that contains the letters for a word. The second parameter contains the character we want the program to look for. The function needs to return True if it finds the character and False if it does not.
For example, let’s say that the following list and character are sent into the function:
["P", "a", "s", "s", "&", "W", "o", "r", "d"] "&"
The function would return back to main.
As with the previous problem, the best way to code this is to open VS Code or IDLE and create your function. You can use the following code to test your function:
def main():
myword = ["" * 9]
mycharacter = str()
myfound = bool()
myword = ["P", "a", "s", "s", "&", "W", "o", "r", "d"]
mycharacter = "&"
myfound = ValidatePassword(myword, mycharacter)
print(myfound)
main()
Your code should print out the following:
True
Once your output matches this output it is safe to move your function code only to Codio for further testing. Although the sample list above contains a list with 8 elements elements, make sure your code can accommodate a list that is either smaller than the one above or larger. (HINT: use the len() function.)
Answers: 1
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe what
Answers: 1
Computers and Technology, 24.06.2019 06:50
What are the things you are considering before uploading photos on social media?
Answers: 1
Validate Password Create a function in Python that will validate a password to make sure that passwo...
Physics, 18.03.2021 02:10
History, 18.03.2021 02:10
Mathematics, 18.03.2021 02:10
Health, 18.03.2021 02:10
English, 18.03.2021 02:10
Mathematics, 18.03.2021 02:10
Mathematics, 18.03.2021 02:10
Mathematics, 18.03.2021 02:10
English, 18.03.2021 02:10