Question: LAB 3 ( Assignment ) PROGRAM STRUCTURES COEB 1 0 1 3 Programming for Engineers / CSEB 1 1 3 Principles of Programming SEMESTER 1

LAB 3(Assignment)
PROGRAM STRUCTURES
COEB1013 Programming for Engineers / CSEB113 Principles of Programming SEMESTER 12024/2025
Instructions
Complete the assignment and submit your file(s) 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 file(s) using the format 'YourID_Shortname_Lab3'. Please indicate the question number before each section of your code.
Ensure that all variables are named using the format 'variablename_xxxx,' where xxxx represents the last four digits of your student ID (i.e., length_1234=15.61).
Question 1
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 2
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 if-else 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.
LAB 3 ( Assignment ) PROGRAM STRUCTURES COEB 1 0

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 Programming Questions!