1. Home
  2. All MCQs

All MCQs with Answers · Page 1346

43,842 multiple choice questions from every subject, newest first. Switch on practice mode to hide the answers and test yourself.

Newest first

On a Series with a DatetimeIndex, what does shift(1, freq='D') do that shift(1) alone does not?

  1. It shifts the values one row down and leaves the index labels untouched
  2. It resamples the series to daily frequency before shifting the values
  3. It fills the vacated rows with the previous value instead of with NaN
  4. It shifts the index labels by a day, keeping values with their labels Correct answer
MCQSEXAM Read explanation

A pattern capturing one or more digits is applied with Series.str.extract to a column where some values do not match. What appears in those rows?

  1. NaN in the extracted column, because a non-match yields a missing value Correct answer
  2. An empty string, because extract returns the unmatched part of the input
  3. The original value unchanged, since extract only rewrites matching rows
  4. An error, because extract requires every value to match the pattern
MCQSEXAM Read explanation

A CloudFront distribution has a default TTL of 86400 seconds and a minimum TTL of 0. The origin sends Cache-Control: max-age=300. For how long does CloudFront cache the object?

  1. 86400 seconds, because the distribution default takes precedence always
  2. 0 seconds, because the minimum TTL allows revalidation on every request
  3. 300 seconds, but only when the viewer sends no conditional headers
  4. 300 seconds, because the origin header overrides the default TTL value Correct answer
MCQSEXAM Read explanation

A Route 53 failover routing policy has primary and secondary records configured. What causes traffic to switch to the secondary?

  1. A latency increase above the threshold set in the routing policy
  2. The TTL of the primary record expiring without a refresh from the zone
  3. The health check on the primary record failing its configured checks Correct answer
  4. The primary record being deleted from the hosted zone by an operator
MCQSEXAM Read explanation

A private subnet needs outbound internet access for software updates but must not accept inbound connections. What is required?

  1. A NAT gateway inside the private subnet with an elastic IP attached to it
  2. A VPC endpoint for the internet that proxies every outbound HTTPS request
  3. A NAT gateway in a public subnet, plus a route in the private route table Correct answer
  4. An internet gateway attached to the private subnet's own route table
MCQSEXAM Read explanation

An API Gateway REST API integrates with a Lambda function that takes 40 seconds to finish. What does the client receive?

  1. A 502 error, because Lambda rejects runs longer than 30 seconds
  2. A 504 only if reserved concurrency has been configured on the function
  3. A 504 timeout, because the integration timeout is capped at 29 seconds Correct answer
  4. A 200 response after 40 seconds, since the gateway waits for the backend
MCQSEXAM Read explanation