Saturday , December 21 2024

Serverless Computing using Cloud Functions – Developer I Cognitive class Exam Answers:-

Course Name :- Serverless Computing using Cloud Functions – Developer I

Module 1 :-Serverless essentials

Question 1 : What characteristics of serverless computing contribute to its name?

  • Developers can run backend code to access databases without using servers.
  • Serverless computing scales inherently to incoming events.
  • Serverless computing does not use servers.
  • Server management decisions are hidden from the developer.
  • Serverless developers only need to configure the service framework for their chosen language.

Question 2 : Serverless computing is a specific technology with a developed set of standards and practices.

  • False
  • True

Question 3 : Serverless computing requires the developer to allocate servers and machine resources.

  • False
  • True

Question 4 : Serverless computing scales inherently and executes stateless code in response to events.

  • False
  • True

Question 5 : Isabelle decided to use serverless computing for a project that crops photos automatically when added to cloud storage. How would you critique her choice?

  • Serverless is a great choice because it can flexibly react to incoming photos and crop them as needed.
  • Serverless won’t work well here because it depends too much on how often customers will be uploading photos.
  • Serverless may work well, but Isabelle will have to spend some time configuring servers to handle the infrequent uploads.
  • Serverless is a great choice here because it allows Isabelle to manage the allocation of machine resources.

Question 6 : You need to develop a project that is as cost-effective as possible. For which reasons would you pick serverless?

  • Serverless outsourcing leads to less infrastructure, operational, and development costs.
  • Serverless only charges for the time when code is executing.
  • Serverless applications can run in low-cost, pre-allocated capacity you can purchase in advance.

Question 7: Long running and non-separable tasks are types of tasks that typically work well in a serverless environment.

  • False
  • True

Question 8 : You are given the following graph of usage for an application you are developing. Which of the following is a correct conclusion of the graph?

  • The usage is mostly sporadic, so serverless computing is a bad fit for this usage case.
  • The usage is mostly sporadic, so serverless computing is a good fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a bad fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a good fit for this usage case.

Module 2 : – Create and invoke action

Question 1 : If you were to execute the following command which invokes a Hello World action:

ibmcloud fn action invoke hello

it would return with an activation ID and an HTTP response generated by the function.

  • False
  • True

Question  2 : When invoking actions, parameter values can be any valid JSON value, including nested objects.

  • False
  • True

Question 3 : It is not possible to monitor activation logs in real time using the command line.

  • False
  • True

Question 4 : It is impossible to perform a blocking invocation on an asynchronous action.

  • False
  • True

Question5: If an action in the middle of a sequence fails, the platform will return the error after the last action in the sequence is invoked.

  • False
  • True

Module 3 :- Manage Actions with packages

Question 1 : You can invoke actions in public packages as if they were normal actions.

  • False
  • True

Question 2 : You can provide default parameters to an action in a public package just as you would a normal action.

  • False
  • True

Question 3 : If you bind a parameter value to a package, that value cannot be overridden on invocation.

  • False
  • True

Question 4 : After creating a custom package as private, you can update the package to make it public.

  • False
  • True

Module 4 : Connect Actions to Event sources

Question 1 : What is a trigger?

  • An API that invokes a function
  • A network connection between an event source and a function
  • A named channel for a class of events
  • Event data that is sent to functions as key-value pairs

Question 2 : What is the purpose of a rule?

  • associates multiple triggers with a single action
  • associates a single trigger with a single action
  • associates a single trigger with multiple actions

Question 3:  Rules allow you to define conditional logic that controls if an action gets invoked based upon event data.

  • True
  • False

Question 4 : Multiple actions can be fired from a single trigger.

  • Correct
  • Incorrect

Module 5 :- Expose Actions as APIs

Question 1 : Any action can be made accessible on the web by simply setting the flag –web to true.

  • False
  • True

Question 2 : Functions that are web actions need to parse the raw HTTP request header to obtain query parameters.

  • False
  • True

Question 3 : Which command would you use to retrieve the HTTP endpoint for a web action?

  • ibmcloud fn api get <action_name> –url
  • ibmcloud fn action get <action_name> –url
  • ibmcloud fn api get <action_name> –http
  • ibmcloud fn action get <action_name> –http

Question 4 : If you have a web action that returns a JSON object, the caller must append .json to the web action’s URL to get a successful response.

  • False
  • True

Module 6 :- Use the Web User Interface (web UI)

Question 1 : When using the ICF Web UI, you can accomplish almost everything you can using the CLI.

  • False
  • True

Question 2 : The ICF Web UI provides access to logs and action metrics.

  • False
  • True

Serverless Computing using Cloud Functions – Developer I Cognitive class final Exam Answer:-

Question 1 : ICF scales your actions automatically only in response to event triggers.

  • False
  • True

Question 2 : You are given the following graph of usage for an application you are developing. Which of the following is a correct conclusion of the graph?

  • The usage is mostly sporadic, so serverless computing is a bad fit for this usage case.
  • The usage is mostly sporadic, so serverless computing is a good fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a bad fit for this usage case.
  • The usage is mostly constant, so serverless computing would be a good fit for this usage case.

Question 3 : Tobias is trying to create an image recognition model for object analysis using large amounts of raw image data. Is serverless a good choice in helping with these tasks?

  • Serverless may be a good choice in both dividing the data into manageable pieces as well as analyzing the data in parallel.
  • Serverless won’t work well here because processing the large amount of raw data would be too costly.
  • Serverless is not a good choice because Tobias would need dedicated servers that have the processing power for analytics.
  • Serverless is a great choice here, but Tobias will have to configure his account to handle the amount of processing needed.

Question 4 : Actions cannot directly invoke other actions without using a sequence.

  • False
  • True

Question 5 : You are able to pass parameters when invoking an action using the command line directly or indirectly using a parameter file.

  • False
  • True

Question 6 : If you have many packages of actions, you can better organize them by creating a package that contains several similar packages.

  • False
  • True

Question 7: Multiple triggers can be configured to fire the same action.

  • Correct
  • Incorrect

Question 8: It may be possible to construct a website entirely using serverless actions.

  • False
  • True

Question 9 : If you wish to monitor your action invocations, you need to use the Web UI.

  • False
  • True

About Machine Learning

Check Also

Python for Data Science Cognitive Class Exam Answers:-

Course Name:- Python for Data Science Module 1. Python Basics Question 1. What is the …

Leave a Reply

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