← Programming Concepts in Mechanical Engineering (25ME34I)
Preface
Programming Concepts in Mechanical Engineering (25ME34I) · C-25 Diploma Mechanical, Semester III
Read with diagrams, search and self-test
Every mechanical engineer of this decade will write code. The machinist who sets a CNC lathe, the quality inspector who plots a control chart, the maintenance technician who reads vibration data from a sensor and the design engineer who runs a finite element analysis are all, in their own way, programmers. The C-25 curriculum of the Department of Technical Education, Karnataka recognises this by introducing Programming Concepts in Mechanical Engineering (25ME34I) as an integrated course in the third semester.
This book has been written for that course, line by line against the official syllabus. In my long years of teaching I have seen that diploma students learn programming best when every concept is tied to something they can touch: a gear, a shaft, a pump, a motor. That is the method followed here. A variable stores the torque of a shaft, a loop prints a multiplication table and then a table of bolt loads, a class represents a car and then a machine, and a list of measurements becomes an X-bar chart.
How this book is organised. The thirteen chapters follow the thirteen weeks of the syllabus exactly. Every chapter contains:
• Learning objectives that tell you what you should be able to do at the end of the week.
• Theory written in simple language with tables, diagrams and solved examples.
• Practice programs covering every experiment listed in the syllabus, each with the algorithm, the Python program, the actual output and an explanation. All plain Python programs were run on a computer and their outputs are printed exactly as produced.
• Exam questions with answers modelled on the CIE theory test and the SEE practical paper.
• Multiple choice questions with the correct answer and the reason, so that you learn why the answer is right.
At the end of the book you will find solved model question papers (CIE-1 theory, CIE-2 practice and SEE practical), the four suggested tutorial activities worked out as mini projects, a Python quick-reference sheet and a set of viva-voce questions.
How to study. Read the theory once, then type every program yourself in Jupyter Notebook, Spyder, PyCharm or Google Colab. Change the input values and predict the output before you press Run. Programming is learnt through the fingers, not the eyes.
I thank the teachers and students whose questions over the years have shaped the explanations in this book. Suggestions for improvement are always welcome.
GS Shashidhara Bengaluru, 2026