Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def isCommonWebAddressFormat (inputURL): Define a function that determines if an input string is in the form of a web address that begins with http and
def isCommonWebAddressFormat (inputURL): Define a function that determines if an input string is in the form of a web address that begins with "http" and ends in either ".com net" or ".org". If the input string ends with one of these suffixes and starts with "http" the function will return True, otherwise it will return False Writing this function will require a bit of string manipulation. It may be helpful to review the strings lecture. Examples: isCommonwebAddressFormat ("http://www.w3schools.con") = True isCommonWebAddressFormat("https://www.python.org")True isCommonwebAddressFormat ("http://stackoverflow.con") = True isCommonWebAddressFormat("http://www.speedtest.net") = True isCommonwebAddressFormat ("http://weather.gov") = False isCommonWebAddressFormat ("www.google.con") = False isCommonwebAddressFormat ("http://buffalo.edu") = False isCommonwebAddressFormat ("website") = False w. google.com
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