All Coursera Quiz Answers

Test your knowledge: Regular expressions Quiz Answer

In this article i am gone to share Coursera Course: Automate Cybersecurity Tasks with Python Week 3 Practice Quiz | Test your knowledge: Regular expressions Quiz Answer with you..

Enroll Link:ย  Automate Cybersecurity Tasks with Python

About this Course: In this course, you will be introduced to the Python programming language and apply it in a cybersecurity setting to automate tasks. You’ll start by focusing on foundational Python programming concepts, including data types, variables, conditional statements, and iterative statements. You’ll also learn to work with Python effectively by developing functions, using libraries and modules, and making your code readable. In addition, you’ll work with string and list data, and learn how to import, parse and debug files. Google employees who currently work in cybersecurity will guide you through videos, provide hands-on activities and examples that simulate common cybersecurity tasks, and help you build your skills to prepare for jobs.


Also visit:ย  Test your knowledge: Work with lists and develop algorithms Quiz Answer


 

ย Test your knowledge: Regular expressions Quiz Answer

Question 1)
Which regular expression symbol represents one or more occurrences of a specific character?

  • \w
  • *
  • +
  • \d

Question 2)
As a security analyst, you are responsible for finding employee IDs that end with the character and number sequence “a6v”. Given that employee IDs consist of both numbers and alphabetic characters and are at least four characters long, which regular expression pattern would you use?

  • “a6v”
  • “\w+a6v”
  • “\wa6v”
  • “\w*a6v”

Question 3)
You have imported the re module into Python with the code import re. You want to use the findall() function to search through a string. Which function call enables you to search through the string contained in the variable text in order to return all matches to a regular expression stored in the variable pattern?

  • findall(text, pattern)
  • re.findall(text, pattern)
  • findall(pattern, text)
  • re.findall(pattern, text)

Question 4)
Which of the following strings would Python return as matches to the regular expression pattern “\w+”? Select all that apply.

  • “”
  • “3”
  • “#name”
  • “FirstName”