Question: LAB 3 ( Assignment ) PROGRAM STRUCTURES COEB 1 0 1 3 Programming for Engineers / CSEB 1 1 3 Principles of Programming SEMESTER 1
LAB Assignment
PROGRAM STRUCTURES
COEB Programming for Engineers CSEB Principles of Programming SEMESTER
Instructions
Complete the assignment and submit your files via BRIGHTEN. Pseudocode and flowchart should be submitted as an MS Word or PDF document, and the Python program should be in a ipynb file. Name your files using the format 'YourIDShortnameLab Please indicate the question number before each section of your code.
Ensure that all variables are named using the format 'variablename where represents the last four digits of your student ID ie length
Question
You are designing a temperature monitoring system for an engine. The system needs to continuously monitor the temperature and alert if it exceeds a certain threshold.
Your task is to write a Python program that:
a Asks the user to input the temperature threshold in degrees Celsius
b Continuously asks the user to input the current temperature.
c Check if the current temperature exceeds the threshold.
d Prints an alert message if the temperature exceeds the threshold.
e Stops monitoring if the user inputs a negative temperature.
You must prepare a pseudocode and a flowchart before you proceed with the programming.
Question
You are tasked with designing a simple traffic light system for a pedestrian crossing. The system should cycle through green, yellow, and red lights and allow pedestrians to cross during the green light.
Write a Python program that:
a Simulates the traffic light system using a loop.
b Uses ifelse statements to change the light colour.
c Prints the current light colour.
d Stops the simulation after a certain number of cycles.
You must prepare a pseudocode and a flowchart before you proceed with the programming.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
