Question: Prob. 1 The program is required to compute the sum and average of a series of numbers a user enters. Using the template python file

Prob. 1
The program is required to compute the sum and average of a series of numbers a user enters.
Using the template python file
Problem1Temp.py, complete the code.
Prob. 2
Points: 40
A Python program has to be developed to display with three LEDs whether a quadratic equation
shown below has real roots or complex roots or roots can't be computed and turn off the three
LEDs (Red, Yellow, and Green) by pressing a pushbutton switch:
ax2+bx+c=0
Red LED (Coefficient a is small): If a tolerance, where the value of tolerance is 0.1
value
Yellow LED (Complex roots): If the value of b2-4ac0.0
Green LED (real roots): if b2-4ac0.0
Hardware Setup (Traffic Light and a PushButton):
Red LED is connected to GPIO 26.
Yellow LED is connected to GPIO 19.
Green LED is connected to GPIO 6.
One terminal of the Pushbutton switch is connected to GPIO 17. Determine the
connection of the other terminal of the PushButton.
Python Code:
Using the skeleton Python script provided in the "
Prob2Temp.py" implement the
program.
Verify your implementation by inputting the following three quadratic equations:
3.0x2+4.0x+2.0=0.0
x2+4.0x-2.0=0.0
0.05x2+4.0x-2.0=0.0
After inputting each equation, reset the LEDs by pressing the Pushbutton.
 Prob. 1 The program is required to compute the sum and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!