0% found this document useful (0 votes)
8 views5 pages

Python List Operations for Temperature Analysis

This lab manual focuses on manipulating Python lists to analyze reactor temperature data, teaching students fundamental operations such as creating, accessing, modifying, and analyzing lists. It emphasizes the importance of temperature control in chemical engineering and provides step-by-step instructions for using Google Colab to perform the analysis. The exercise culminates in understanding how to store, update, and analyze temperature readings, which is essential for data processing in engineering contexts.

Uploaded by

misbahniazi64
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

Python List Operations for Temperature Analysis

This lab manual focuses on manipulating Python lists to analyze reactor temperature data, teaching students fundamental operations such as creating, accessing, modifying, and analyzing lists. It emphasizes the importance of temperature control in chemical engineering and provides step-by-step instructions for using Google Colab to perform the analysis. The exercise culminates in understanding how to store, update, and analyze temperature readings, which is essential for data processing in engineering contexts.

Uploaded by

misbahniazi64
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

LAB MANUAL:6
Manipulating Strings, Lists, and Tuples for Data Handling

Reactor Temperature List Analysis Using


Python Lists
1. Objective
The purpose of this task is to practice fundamental Python list operations while working with
reactor temperature data. Students will learn how to create a list, access individual elements,
modify specific values, append new entries, and analyze the dataset using built-in Python
functions such as max() and min(). This simulates how engineers often handle small datasets
during preliminary analysis, troubleshooting, or quick verification in process monitoring.

2. Introduction
In chemical engineering, temperature control inside a reactor is critical because it directly
influences reaction rate, conversion, product quality, and safety. Engineers frequently work
with datasets collected from sensors placed at different points in the reactor or at different
times during operation.
Python, especially in environments like Google Colab, provides an easy and efficient way to
store, modify, and analyze such readings.

In this experiment, we simulate a simple set of reactor temperature readings and then apply
Python list operations to interpret and adjust the data. This type of practice is foundational
before moving toward larger datasets, data visualization, or applying statistical or machine-
learning techniques.

3. Opening Google Colab


Follow the steps below to begin your notebook:

1. Open your web browser (Chrome recommended for smooth experience).


2. Go to [Link]
3. Click File → New Notebook, or simply hit New Notebook from the home screen.
4. A blank notebook will appear with your first code cell ready.
5. You will now enter the code cells below in order, running each one individually to
observe the output.

Uw-24-che-bsc-004 Misbah
2

4. Step-by-Step Code Implementation


Below are the detailed steps to perform the full reactor temperature analysis. Each section
represents one cell in Google Colab. You run each cell by pressing Shift + Enter.

Cell 1 — Creating the dataset


Here we create a temperature list using your custom readings.

These values represent a reactor's temperature profile across different time intervals or
measurement points.

Cell 2 — Accessing the first and last temperature


We use indexing to extract the earliest and latest recorded temperatures.

Uw-24-che-bsc-004 Misbah
3

This gives a quick overview of how the reactor started vs. where it ended.

Cell 3 — Adding a new reading


Appending temperature values is common when new data arrives from sensors.

Uw-24-che-bsc-004 Misbah
4

Cell 4 — Updating a specific reading


We replace the third reading (index 2) to reflect a corrected or updated sensor value.

Cell 5 — Full Analysis: Updated List, Maximum,


Minimum
Finally, we analyze the temperature behavior by finding the highest and lowest values in the
list.

Uw-24-che-bsc-004 Misbah
5

Output:

5. Conclusion
In this exercise, multiple list operations were performed on a set of reactor temperature
readings. The analysis demonstrated how to:

• Store multiple temperature values in a Python list


• Access individual readings (first and last)
• Append new data during real-time updates
• Correct or modify existing values
• Analyze the dataset to find maximum and minimum temperatures

Such techniques form the base of data processing tasks in chemical engineering, especially
when handling sensor readings, batch logs, and experimental data.

Uw-24-che-bsc-004 Misbah

You might also like