Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python please Wyrwyra r y PIU DIR , Question 2 E zyBooks cata 7.15 Programming Assignment 2, Question 2 We are trying to make sure
python please
Wyrwyra r y PIU DIR , Question 2 E zyBooks cata 7.15 Programming Assignment 2, Question 2 We are trying to make sure your passphrase is acceptable! Write a script that asks for an input string that will be used as your passphrase. This input string must have three 'words' separated by a space character. Each of these words has specific requirements, listed below. You must write a function for each requirement (three total functions) because we will be using unit tests for grading this problem, meaning we will be checking the correctness of your functions individually in addition to checking your overall output. Unit testing is common practice, so it is good to become familiar with the idea of testing independent parts of your code as you develop. Make sure your functions follow the original template provided. First Function: For the first word, you must check if it is a palindrome (meaning it is the same forward and backward, like 'glolg'or "tacocat"), is case-insensitive (so "GfraaRFg" or "Vobov' are valid), and only uses alphabetical letters (tre3ert' and h@s@h"P" are not valid). Second Function: For the second word, you must check if it is a positive integer with at least 4 digits, containing only numeric characters (ie.no alphabetic, punctuation, or special characters). Third Function: For the third word, you must check if it starts with one of these special characters ('@'S: 8) ends with a punctuation mark (only commas (). periods ("), exclamation marks ("!) and question marks (?) are allowed), and has three letters in between the special character and punctuation mark (e.g. '@dog' or 'Stpb7" or "cat If the entire password meets all the correct specifications, then print valid, otherwise, print 'invalid! For example, the password 'taCocaT 12345@LAGI should evaluate to True while the password 'blarg 365 oops' should evaluate to False. ACTIVITY 7.15.1: Programming Assignment 2, Question 2 8/40 Downloadable files main.py Download Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started