📖 Scenario: You are setting up virtual machines (VMs) in Azure for different workloads. Each VM size belongs to a series that fits specific needs:B-series: Economical, burstable VMs for light workloads.D-series: General purpose VMs with balanced CPU and memory.E-series: Memory optimized VMs for heavy memory workloads.F-series: Compute optimized VMs for CPU intensive tasks.You want to organize VM sizes by their series to help choose the right VM for your projects.
🎯 Goal: Create a dictionary of Azure VM sizes with their series, then filter and list VM sizes by series to understand their grouping.
📋 What You'll Learn
Create a dictionary called vm_sizes with exact VM size names as keys and their series as values.
Create a variable called selected_series and set it to the string 'D'.
Use a list comprehension to create a list called d_series_vms containing VM sizes from vm_sizes that belong to the selected_series.
Add a final configuration line that sets a variable total_d_vms to the count of VM sizes in d_series_vms.
💡 Why This Matters
🌍 Real World
Organizing and selecting Azure VM sizes by series helps cloud architects choose the right VM for workloads, optimizing cost and performance.
💼 Career
Cloud engineers and architects often need to understand VM series to design scalable and cost-effective infrastructure.
Progress0 / 4 steps
1
Create the Azure VM sizes dictionary
Create a dictionary called vm_sizes with these exact entries: 'Standard_B1s': 'B', 'Standard_D2s_v3': 'D', 'Standard_E4s_v3': 'E', 'Standard_F8s': 'F', 'Standard_B2ms': 'B', 'Standard_D4s_v3': 'D'.
Azure
Hint
Use curly braces {} to create a dictionary with the exact keys and values.
2
Set the selected VM series
Create a variable called selected_series and set it to the string 'D' to select the D-series VMs.
Azure
Hint
Assign the string 'D' to the variable selected_series.
3
Filter VM sizes by the selected series
Use a list comprehension to create a list called d_series_vms that contains all VM size names from vm_sizes where the series matches selected_series.
Azure
Hint
Use a list comprehension with vm_sizes.items() to filter keys where the value equals selected_series.
4
Count the number of D-series VM sizes
Add a line that creates a variable called total_d_vms and sets it to the length of the list d_series_vms.
Azure
Hint
Use the len() function to count the items in d_series_vms.
Practice
(1/5)
1. Which Azure VM series is best suited for applications that need to handle occasional spikes in CPU usage but are idle most of the time?
easy
A. E series (memory optimized)
B. D series (balanced CPU and memory)
C. B series (burstable VMs)
D. F series (compute optimized)
Solution
Step 1: Understand the purpose of B series VMs
B series VMs are designed for workloads that are idle most of the time but need to burst CPU power occasionally.
Step 2: Compare with other series
D series are balanced, E series focus on memory, and F series focus on CPU but not burstable. So B series fits the description best.
Final Answer:
B series (burstable VMs) -> Option C
Quick Check:
Bursty CPU needs = B series [OK]
Hint: Burstable CPU needs? Pick B series [OK]
Common Mistakes:
Choosing D series for bursty workloads
Confusing F series with burstable
Picking E series which is memory optimized
2. Which of the following is the correct way to describe the F series Azure VMs?
easy
A. Memory optimized VMs for heavy database workloads
B. Burstable VMs for low baseline CPU usage
C. Balanced VMs with equal CPU and memory
D. Compute optimized VMs with higher CPU-to-memory ratio
Solution
Step 1: Identify F series characteristics
F series VMs are compute optimized, meaning they have more CPU power relative to memory.
Step 2: Eliminate other options
Memory optimized describes E series, burstable describes B series, and balanced describes D series.
Final Answer:
Compute optimized VMs with higher CPU-to-memory ratio -> Option D
Quick Check:
F series = compute optimized [OK]
Hint: F series means more CPU power, less memory [OK]
Common Mistakes:
Mixing F series with memory optimized E series
Thinking F series are burstable
Confusing balanced D series with F series
3. You deploy an application that requires high memory but moderate CPU. Which VM series will likely give you the best performance and cost balance? Options: B, D, E, F
medium
A. B series
B. E series
C. F series
D. D series
Solution
Step 1: Match workload needs to VM series
High memory and moderate CPU needs point to memory optimized VMs.
Step 2: Identify E series as memory optimized
E series VMs are designed for memory-intensive workloads, making them suitable here.
Final Answer:
E series -> Option B
Quick Check:
High memory need = E series [OK]
Hint: High memory? Choose E series [OK]
Common Mistakes:
Choosing F series which is CPU optimized
Picking B series which is burstable
Selecting D series which is balanced but not memory focused
4. A developer chose a B series VM for a high-CPU, always-on web server. What is the main issue with this choice?
medium
A. B series VMs are burstable and may throttle CPU under constant load
B. B series VMs do not support web servers
C. B series VMs have too much memory for web servers
D. B series VMs are more expensive than F series
Solution
Step 1: Understand B series limitations
B series VMs are designed for workloads with low baseline CPU and occasional bursts, not constant high CPU.
Step 2: Identify why this is a problem for always-on high CPU
Constant high CPU usage will cause B series VMs to throttle performance, hurting the web server.
Final Answer:
B series VMs are burstable and may throttle CPU under constant load -> Option A
Quick Check:
Constant high CPU ≠ B series [OK]
Hint: Burstable VMs throttle under constant CPU load [OK]
Common Mistakes:
Thinking B series can't run web servers
Assuming B series has too much memory
Believing B series is more expensive than F series
5. You need to deploy a data analytics application that requires high CPU power and large memory but must also be cost-effective. Which VM series combination should you consider to optimize performance and cost?
hard
A. Use F series for CPU-intensive tasks and E series for memory-intensive tasks
B. Use only B series VMs to save cost
C. Use D series VMs as they balance CPU and memory well
D. Use E series only because memory is most important
Solution
Step 1: Analyze workload requirements
The application needs both high CPU and large memory, which may not be met efficiently by a single VM series.
Step 2: Consider splitting workload across VM series
F series VMs provide high CPU power, while E series VMs provide large memory. Using both can optimize cost and performance.
Step 3: Evaluate other options
B series is burstable and not suitable for heavy workloads. D series is balanced but may not optimize cost as well. E series alone may lack CPU power.
Final Answer:
Use F series for CPU-intensive tasks and E series for memory-intensive tasks -> Option A
Quick Check:
Split CPU and memory needs = F + E series [OK]
Hint: Split CPU and memory tasks across F and E series [OK]
Common Mistakes:
Choosing only B series to save cost ignoring performance
Relying solely on D series without optimization
Using only E series and missing CPU needs
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.