Question: Answer in Python A seven segment display is used to show numbers, using 7 separate segments which can be lit up individually. They are labeled

Answer in Python

A seven segment display is used to show numbers, using 7 separate segments which can be lit up individually. They are labeled A through G in the image below.

Answer in Python A seven segment display is used to show numbers,

Part A: Write one function that would turn on different segments to represent the digits 0 - 9. This function would take in one parameter, representing the number that we want to display. Assume that turning on a light segment is a boolean. For instance, if I wanted to turn on segment A, I would write something like:

segmentAOn = True

And if I wanted to turn it off, I would write something like:

segmentAOn = False

For example, the code to display the number 8 could look something like this:

segmentAOn = True

segmentBOn = True

segmentCOn = True

segmentDOn = True

segmentEOn = True

segmentFOn = True

segmentGOn = True

Part B: Write function calls that would cause the number 1, then the number 2, then the number 3 to display.

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!