Descriptive Questions 3
Descriptive Questions 3
Define the function “match_four” that takes a string and uses regex to return
True if the string starts with 4
followed by zero to many other digits and False if it does not.
2. Create a BeautifulSoup object named soup using the url https://umich.edu/. Using
BeautifulSoup,
print the URL that links to Current Students in the Navigation Bar.
3. Construct a DVWA setup to test the basic Cross Site Request Forgery (XSRF)
attack for changing the admin password to "exam123" and execute the DVWA with the
new password.
4. Write a program that asks users for their sandwich preferences. The program
should use PyInputPlus to ensure that they enter valid input, such as:
(a) Using inputMenu() for a bread type: wheat, white, or sourdough.
(b) Using inputYesNo() to ask if they want cheese.
(c) If so, using inputMenu() to ask for a cheese type: cheddar, Swiss,
or mozzarella.
(d) Using inputInt() to ask how many sandwiches they want. Make sure this
number is 1 or more.
5. DNA sequences are comprised of a simple 4-alphabet language with the symbols
{A,C,G,T}. Three consecutive letters are known as a codon, so ACT and TCG are both
codons. A Gene is a collection of at least three codons that starts with an ATG
codon and ends with a TAA, TAG, or TGA codon.
You need to develop a regular expression that will match strings that contain a
gene.