0% found this document useful (0 votes)
2 views2 pages

Python Notes Large Print

This document provides study notes on Python programming tailored for mechanical engineering students, highlighting its core features such as simplicity, versatility, and applications in automation and engineering. Key topics include Python's syntax rules, variable handling, and practical code examples like a temperature converter and a multiplication loop. The notes emphasize Python's role in automating tasks and performing engineering calculations.

Uploaded by

hellomaggie010
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)
2 views2 pages

Python Notes Large Print

This document provides study notes on Python programming tailored for mechanical engineering students, highlighting its core features such as simplicity, versatility, and applications in automation and engineering. Key topics include Python's syntax rules, variable handling, and practical code examples like a temperature converter and a multiplication loop. The notes emphasize Python's role in automating tasks and performing engineering calculations.

Uploaded by

hellomaggie010
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

PYTHON PROGRAMMING STUDY NOTES

Large Print Edition for Mechanical Engineering Students

Unit 1: Core Features of Python


Python is a high-level, versatile programming language renowned for its simplicity,
readability, and wide range of applications. It is widely used in web development, data
science, artificial intelligence, and engineering automation.

Key Features:
• Easy to Learn: Simple syntax perfect for beginners.
• Interpreted: Code is executed line-by-line without pre-compilation.
• High-Level: Abstracted from hardware complexities.
• Object-Oriented: Fully supports classes, objects, and inheritance.
• Platform Independent: Runs on Windows, Linux, and macOS seamlessly.
• Open Source: Free to download, use, and modify.
• Dynamically Typed: No explicit variable type declarations required.
• Large Standard Library: Built-in modules for file and web tasks.

Applications in Automation & Engineering


In Automation:
1. File Handling: Automatically rename, move, or copy files.
2. Notifications: Programmatically dispatch emails and alerts.
3. Web Automation: Form filling, web scraping, and automated tasks.

In Engineering:
1. Calculations: Fast mathematical analysis and solving formulae.
2. Robotics & IoT: Direct sensor interfacing and machine control algorithms.
3. Simulations: Virtual stress, fluid, or thermodynamic testing.
Python Syntax Rules & Variables
• Indentation: Python uses uniform whitespace blocks instead of curly braces.
• Case-Sensitive: Lowercase and uppercase identifiers are completely distinct.
• Variables: Named pointers to data, assigned dynamically via the '=' operator.

Practical Engineering Code Examples


Example 1: Temperature Unit Converter
celsius = float(input('Enter Celsius: '))
fahrenheit = (celsius * 9/5) + 32
print('Fahrenheit =', fahrenheit)

Example 2: Core Loop Structure


num = int(input('Enter number: '))
for i in range(1, 11):
print(num, 'x', i, '=', num * i)

You might also like