Write a Python function fun8(k) that gets list of strings k as passwords and returns the valid passwords in list format. Criteria for checking passwords:
1.) At least 1 letter between [a-z]
2.) At least 1 letter between [A-Z]
3.) At least 1 number between [0-9]
4.) At least 1 character from [$#@]
5.) Minimum length of transaction password: 6
6.) Maximum length of transaction password: 12
7.) No spaces
Example:
>>>lst=["ABd1234@1", "a F1#,2w3E*", "2We3345"]
>>>fun8(lst)
[ABd1234@1]
*****We are a 100 level intro to computer science class, please don't use anything overly complex/advanced.
def fun8(lst):
result = []
for x in lst:
hasLower = False
hasUpper = False
hasDigit = False
hasSpecial = False
hasNoSpace = True
if(len(x)>=6 and len(x)<=12):
for i in x:
if(i.islower()):
hasLower = True
if(i.isupper()):
hasUpper = True
if(i.isdigit()):
hasDigit = True
if i in "$#@":
hasSpecial = True
if(i == ' '):
hasNoSpace = False
if(hasLower and hasUpper and hasDigit and hasSpecial and hasNoSpace):
result.append(x)
return result
# Testing
lst=["ABd1234@1", "a F1#,2w3E*", "2We3345"]
print(fun8(lst))

['ABd1234@1']

Write a Python function fun8(k) that gets list of strings k as passwords and returns the...
PYTHON 1.Guessing many passwords: Write a function called guess_passwords. It doesn't take any arguments. It should use the function guess, trying out as many possible passwords as possible. Here are some methods you might try: Try out a hardcoded list of strings that you think people might use as passwords. Try out all words in the word file. Try out all character combinations of length 4 or less (or more if you don't mind waiting). Try out combinations of words...
PYTHON CODE ONLY PLEASE, AND COMMENT IN SCRIPT TO SHOW
STEPS (post copy-ready text code, and also a screenshot of code
running)
You work for an on-line game site. Your job is to develop a program that accepts a user name and password. Write a Python script that prompts users for a user name and password. a. The user name should be at least 6 characters long and is stored in a list such that it 1. can't be used...
In python
Exercise 4 (graded) Write a function "passValidate" that takes a string "s" and checks the validity of string as a password Validation Rules: At least 1 lowercase letter between [a-z] and 1 upper case letter between [A-Z]. At least 1 number between [0-9 At least 1 character from [$#@]. Minimum length 6 characters. Maximum length 16 characters. CS103-Lab 13 Page 3 of 3 Sample Input: s"Uab@2762" Sample Output: True
solve with python
Write a recursive function recStringWithLenCount() that takes a
one-dimensional list of strings as a parameter and returns the
count of strings that have at least the length of second parameter
passed into the function that are found in the list. Recall that
you can determine whether an item is a string by writing type(item)
== str. The only list functions you are allowed to use are len(),
indexing (lst[i] for an integer i), or slicing (lst[i:j] for...
Write a Python function fun3(e) to update a list of numbers e such that the first and last elements have been exchanged. The function needs to also return multiplication of elements of e. You should assume that the list e has at least 2 elements. Example: >>>lst = [4, 1, 2, -1] >>>fun3(list) -8 >>>lst [-1, 1, 2, 4] *We are an intro to CS class so please do not use anything too advance or fancy. Stick to basics. Right...
python write a function called vowel_check() that gets a list of strings and outputs how many vowels are in each str, and as well what str has the most vowel with how many it has
Write a program that inputs a string from the user representing a password, and checks its validity. A valid password must contain: -At least 1 lowercase letter (between 'a' and 'z') and 1 uppercase letter (between 'A' and 'Z'). -At least 1 digit (between '0' and '9' and not between 0 and 9). At least 1 special character (hint: use an else to count all the characters that are not letters or digits). -A minimum length 6 characters. -No spaces...
language is python
Write a function named subsetStrings that has two inputs, a list of strings and an integer n. Your function should use a single list comprehension to create a new list containing the first n characters of each string in the input list if the length of the individual string is at least n (strings that are too short should be skipped). Your function should return the new list ex: inputList 'Frederic, 'powerade', 'spring break, 'pen'] and n-4...
Problem 1. Write a Python function times_i_at_odd(L) that takes as arguments a list L and returns a list consisting of the elements of L multiplied by the index number of the element at odd positions. (Use list comprehensions) >>> times_i_at_odd([1,2,3,4,5,6,7,8,9,10]) [2, 12, 30, 56, 90] Problem 2. Write a recursive function sum_cols(grid, n) that takes a list of lists of integers grid and integer n and returns the sum of column n in grid. For example, the call sum_cols([[1,2,3,4], [10,20,30,40],...
**DO IT AS PYTHON PLEASE**
The Trifid Cipher General Problem Description The Trifid cipher (not to be confused with the creatures from the classic science-fiction film "The Day of the Triffids") is an algorithm that enciphers a plaintext message by encoding each letter as a three-digit number and then breaking up and rearranging the digits from each letter's encoded form. For this assignment, you will create a set of Python functions that can encode messages using this cipher (these functions...