All Coursera Quiz Answers

Test your knowledge: Arguments, parameters and return statements Quiz Answer

In this article i am gone to share Coursera Course: Automate Cybersecurity Tasks with Python Week 2 Practice Quiz | Test your knowledge Arguments, parameters and return statements 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: Introduction to functions Quiz Answer


 

Test your knowledge Arguments, parameters and return statements Quiz Answer

Question 1)
Fill in the blank: In the following code, the integers 5 and 12 are _____:

for i in range(5, 12):
print(i)
  • parameters
  • return statements
  • arguments
  • functions

Question 2)
What is the correct way to define the function addition() if it requires the two parameters num1 and num2?

  • def addition(num1)(num2):
  • def addition(num1 num2):
  • def addition(num1, num2):
  • def addition(num1 and num2):

Question 3)
Which of the following lines of code has correct syntax for printing the data type of the string “elarson”?

  • type(print(“elarson”))
  • print(“elarson”, type)
  • print(type, “elarson”)
  • print(type(“elarson”))

Question 4)
Which function definition includes the correct syntax for returning the value of the result variable from the doubles() function?

def doubles(num):
       result = num * 2
       return result