0
0
Intro to Computingfundamentals~10 mins

Why cloud computing enables scale in Intro to Computing - Test Your Understanding

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

Complete the code to show how cloud computing allows adding more {{BLANK_1}} easily.

Intro to Computing
servers = ['server1', 'server2']
servers.append([1])
Drag options to blanks, or click blank then click option'
A'server3'
B'server1'
Cserver3
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable without quotes causes an error.
Adding a number instead of a server name.
2fill in blank
medium

Complete the code to represent how cloud resources can be {{BLANK_1}} or down quickly.

Intro to Computing
def scale_resources(action):
    if action == '[1]':
        return 'Resources increased'
    else:
        return 'Resources decreased'
Drag options to blanks, or click blank then click option'
Ascaled
Bscaled down
Cscaled up
Dscaled quickly
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'scaled' alone is vague.
Using 'scaled down' means decreasing, not increasing.
3fill in blank
hard

Fix the error in the code that simulates cloud scaling by filling the blank.

Intro to Computing
resources = 5
resources = resources [1] 3  # Increase resources by 3
Drag options to blanks, or click blank then click option'
A-
B+
C*
D/
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-' decreases resources.
Using '*' multiplies resources incorrectly.
4fill in blank
hard

Fill the blank to create a dictionary showing resource names and their {{BLANK_1}} in cloud scaling, filtering only those with {{BLANK_2}} usage above 50.

Intro to Computing
resources = {'server1': 45, 'server2': 60, 'server3': 75}
high_usage = {name: usage for name, usage in resources.items() if usage [1] 50}
Drag options to blanks, or click blank then click option'
A!=
B<
C==
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' filters lower usage.
Using '==' filters only exactly 50.
5fill in blank
hard

Fill all three blanks to create a dictionary that maps server names in uppercase to their {{BLANK_1}}, including only those with usage {{BLANK_2}} 50 and {{BLANK_3}} 80.

Intro to Computing
resources = {'server1': 45, 'server2': 60, 'server3': 75, 'server4': 85}
filtered = {name[1]: usage for name, usage in resources.items() if usage [2] 50 and usage [3] 80}
Drag options to blanks, or click blank then click option'
A.upper()
B>
C<
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' filters exact values only.
Mixing up '>' and '<' operators.