Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using python 2. Filename: assign4-2.py Create a function that takes a string as a parameter, check if a given string contains only alphanumeric characters (i.e.
using python
2. Filename: assign4-2.py Create a function that takes a string as a parameter, check if a given string contains only alphanumeric characters (i.e. a-z, A-Z and 0-9) or not. If not, print out all the non-alphanumeric characters:"\*%@#,{}$-) exist in the string. If the string does not contain non-alphanumeric, print "all are alphanumeric characters". H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module4\assign4-2.py Welcome To2431 all are alphanumeric characters H:\>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module4\assign4-2.py ABCD;defg!123% The string contains some non-alphanumeric characters: (';', '!', '%'] H:\>python C:\Users aslsabbaghpourhokma Documents\IT2431\Module4\assign4-2.py hello! The string contains some non-alphanumeric characters: ['!'] H:>python C:\Users aslsabbaghpourhokma\Documents\IT2431\Module4\assign4-2.py Good Luck123Good Luck all are alphanumeric characters 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