Python Project for AI & Application Development Quiz Answers

Python Project for AI & Application Development Week 01 Quiz Answers

Q1. The prefix to the filename where you write the test cases is:

  • function_test
  • It has not prefix
  • test
  • unit_test

Q2. The python code will throw runtime error if pylint is not run before executing the file.

  • False
  • True

Q3. In accordance with pylint which of the following is valid method name

  • getUserName()
  • get_user_name
  • GetUserName
  • GET_USER_NAME

Q4. Your code has the following method.

def returnString():

return “Hello”

What will be the outcome of the test?

assertNotEqual(returnString(),”How are you”,”They are equal”)

  • The test will pass.
  • The test will fail.
  • The code will throw runtime error as the values are not equal
  • The test will not run as the method name does not qualify in static code analysis.

Q5. To package a python script in a package to be able to import and use it, which of the following is required.

  • A folder with server.py
  • The python script should be packaged in a directory with __init__.py in the same directory
  • import sys as the first line of code in the python script.
  • The methods in the script should be defined as public method

Q6. Which of the following is correct about Flask?

  • It is a full-stack application framework
  • It is a micro web framework
  • It is a database framework
  • It is an external Java framework

Q7. Which of the following methods are supported in an API endpoint created with Flask?

1. GET

2. AUTHENTICATE

3. POST

4. DELETE

  • Only 1 and 4
  • Only 1,3 and 4
  • Only 1,2 and 3
  • All 4 are supported.

Q8. What is the below line of code referred to as?

@app.route(“/name”)

  • Method definition
  • Route decorator
  • Get Request
  • Flask method

Q9. One method can have only one route decorator. True or False?

  • True
  • False

Q10. Which of the following is true about the following line of code?

@api.route(“/records/<name>”,methods=[“POST”,”GET”])

  • This end-point supports get requests
  • This end-point supports post requests
  • This end-point supports update requests
  • The value of name is variable.

Get all IBM Full Stack Cloud Developer Professional Certificate Quiz Answers

Introduction to Cloud Computing Coursera Quiz Answers

Introduction to Web Development with HTML, CSS, JavaScript Quiz Answers

Developing Cloud Native Applications Coursera Quiz Answers

Developing Cloud Apps with Node.js and React Coursera Quiz Answers

Introduction to Containers w/ Docker, Kubernetes & OpenShift Quiz Answers

Python for Data Science, AI & Development Coursera Quiz Answers

Python Project for AI & Application Development Coursera Quiz Answers

Developing Applications with SQL, Databases, and Django Quiz Answers

Application Development using Microservices and Serverless Quiz Answers

Full Stack Cloud Development Capstone Project Coursera Quiz Answers

Team Networking Funda
Team Networking Funda

We are Team Networking Funda, a group of passionate authors and networking enthusiasts committed to sharing our expertise and experiences in networking and team building. With backgrounds in Data Science, Information Technology, Health, and Business Marketing, we bring diverse perspectives and insights to help you navigate the challenges and opportunities of professional networking and teamwork.

Leave a Reply

Your email address will not be published. Required fields are marked *