0
0
GCPcloud~30 mins

GCP free tier and credits - Mini Project: Build & Apply

Choose your learning style9 modes available
Understanding GCP Free Tier and Credits
📖 Scenario: You are starting to learn Google Cloud Platform (GCP). You want to understand how the free tier and credits work so you can try services without unexpected costs.
🎯 Goal: Build a simple GCP project setup that shows how to track free tier usage and apply credits to your billing account.
📋 What You'll Learn
Create a dictionary called free_tier_services with exact service names and their free tier limits
Add a variable called monthly_credits with the exact value of 300
Write a function called calculate_remaining_credits that takes used_credits and returns remaining credits
Add a final configuration dictionary called billing_info that includes free_tier_services, monthly_credits, and a sample used_credits value
💡 Why This Matters
🌍 Real World
Cloud users and developers often track free tier limits and credits to avoid unexpected charges.
💼 Career
Understanding cloud billing basics is essential for cloud engineers, developers, and IT managers to optimize costs.
Progress0 / 4 steps
1
Create the free tier services dictionary
Create a dictionary called free_tier_services with these exact entries: 'Compute Engine': '1 f1-micro instance per month', 'Cloud Storage': '5 GB standard storage', 'BigQuery': '1 TB queries per month'
GCP
Need a hint?

Use a Python dictionary with the exact keys and values given.

2
Add monthly credits variable
Add a variable called monthly_credits and set it to the integer 300 representing the $300 free credit amount.
GCP
Need a hint?

Just assign the number 300 to the variable monthly_credits.

3
Write function to calculate remaining credits
Write a function called calculate_remaining_credits that takes one parameter used_credits and returns the remaining credits by subtracting used_credits from monthly_credits.
GCP
Need a hint?

Define a function with one parameter and return the difference.

4
Create billing info dictionary
Create a dictionary called billing_info with keys 'free_tier_services', 'monthly_credits', and 'used_credits'. Set 'free_tier_services' to the free_tier_services dictionary, 'monthly_credits' to the monthly_credits variable, and 'used_credits' to the integer 120.
GCP
Need a hint?

Use a dictionary with the exact keys and values as described.