0
0
GCPcloud~10 mins

Cloud Functions pricing in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the billing unit for Cloud Functions memory allocation.

GCP
memory: [1]
Drag options to blanks, or click blank then click option'
A256MB
B256
C256GB
D256KB
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number without unit like '256'
Using incorrect units like GB or KB
2fill in blank
medium

Complete the code to set the maximum function execution time in seconds.

GCP
timeout: [1]
Drag options to blanks, or click blank then click option'
A300ms
B540s
C540
D5m
Attempts:
3 left
💡 Hint
Common Mistakes
Using only a number without unit
Using 'ms' or 'm' instead of 's'
3fill in blank
hard

Fix the error in the billing configuration by selecting the correct CPU allocation format.

GCP
cpu: [1]
Drag options to blanks, or click blank then click option'
A1000m
B1vCPU
C1cpu
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using '1' without units
Using '1vCPU' which is invalid
Using lowercase 'cpu' without 'm'
4fill in blank
hard

Fill both blanks to correctly calculate the total billed GB-seconds for a function.

GCP
billed_gb_seconds = memory_in_gb [1] execution_time_seconds [2]
Drag options to blanks, or click blank then click option'
A*
B+
C/
D-
Attempts:
3 left
💡 Hint
Common Mistakes
Using division or subtraction instead of multiplication
Mixing operators incorrectly
5fill in blank
hard

Fill all three blanks to define a pricing formula for Cloud Functions including memory, CPU, and invocation count.

GCP
total_cost = (memory_gb [1] memory_rate) + (cpu_units [2] cpu_rate) + (invocations [3] invocation_rate)
Drag options to blanks, or click blank then click option'
A*
B+
C-
D/
Attempts:
3 left
💡 Hint
Common Mistakes
Using addition instead of multiplication for rates
Using division or subtraction incorrectly