0
0
Intro to Computingfundamentals~10 mins

Wi-Fi and network connections in Intro to Computing - Interactive Code Practice

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

Complete the code to connect to a Wi-Fi network by specifying the network name.

Intro to Computing
connect_to_wifi(network_name=[1])
Drag options to blanks, or click blank then click option'
A192.168.1.1
Bpassword123
C"HomeNetwork"
Dethernet
Attempts:
3 left
💡 Hint
Common Mistakes
Using the password instead of the network name.
Using an IP address instead of the network name.
2fill in blank
medium

Complete the code to check if the device is connected to Wi-Fi.

Intro to Computing
if connection_status == [1]:
    print("Connected to Wi-Fi")
Drag options to blanks, or click blank then click option'
ATrue
B"connected"
C"disconnected"
DFalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using boolean True instead of the string "connected".
Using "disconnected" which means no connection.
3fill in blank
hard

Fix the error in the code to get the IP address assigned by the Wi-Fi router.

Intro to Computing
ip_address = get_ip_address([1])
Drag options to blanks, or click blank then click option'
A"WiFi"
Bwifi
CWiFi
D"wifi"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing wifi without quotes causes a NameError.
Using capitalized WiFi without quotes is incorrect.
4fill in blank
hard

Fill both blanks to create a dictionary of Wi-Fi networks with their signal strengths greater than 50.

Intro to Computing
strong_networks = {network: [1] for network, strength in networks.items() if strength [2] 50}
Drag options to blanks, or click blank then click option'
Astrength
B>
C<
Dnetwork
Attempts:
3 left
💡 Hint
Common Mistakes
Using network as value instead of strength.
Using less than symbol which filters weak signals.
5fill in blank
hard

Fill all three blanks to create a dictionary of Wi-Fi networks with names in uppercase and signal strength above 70.

Intro to Computing
filtered_networks = [1]: [2] for [3], strength in networks.items() if strength > 70}
Drag options to blanks, or click blank then click option'
Anetwork.upper()
Bstrength
Cnetwork
Dnet
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'net' instead of 'network' as loop variable.
Not converting network names to uppercase.