subject

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.)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
What type of weird relationship this is analogy show? dissolve: solidify: : noise: silence
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
Write and test a python program to find and print the largest number in a set of real (floating point) numbers. the program should first read a single positive integer number from the user, which will be how many numbers to read and search through. after reading in all of the numbers, the largest of the numbers input (not considering the count input) should be printed.
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Match the function to its purpose. fast worth 50pts.
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
Answers: 2
You know the right answer?
Validate Password Create a function in Python that will validate a password to make sure that passwo...
Questions
question
History, 24.10.2019 03:00
question
Mathematics, 24.10.2019 03:00
question
Mathematics, 24.10.2019 03:00
Questions on the website: 13722362