Complete the code to print the main difference between Raspberry Pi and Arduino.
print("Raspberry Pi is a [1] computer, while Arduino is a microcontroller.")
The Raspberry Pi is a single-board computer, which means it can run an operating system and perform many tasks like a regular computer. Arduino is a microcontroller designed for simple control tasks.
Complete the code to show which device is better for running complex software.
best_for_complex_software = "[1]"
Raspberry Pi can run complex software because it is a full computer with an operating system. Arduino is limited to simple programs.
Fix the error in the code that compares power consumption of Raspberry Pi and Arduino.
power_consumption = [1] # in watts if power_consumption < 5: print("Low power device") else: print("High power device")
Power consumption should be a number, not a string or device name. Arduino typically uses about 3 watts, which is low power.
Fill both blanks to create a dictionary showing which device is better for each feature.
comparison = {"processing_power": "[1]", "power_efficiency": "[2]"}Raspberry Pi has better processing power. Arduino is more power efficient.
Fill all three blanks to create a summary dictionary comparing Raspberry Pi and Arduino.
summary = {"device": "[1]", "main_use": "[2]", "programming_language": "[3]"}Arduino is the device. Arduino is mainly for embedded control. Both use C/C++ for programming, but Raspberry Pi supports many languages.