APPLICATION
PROGRAMMING
ECE 2423
LEARNING OUTCOMES
By the end of this course, you should be able to:
• Construct code in Python for Graphical User Interfaces
• Design a relational database application using MySQL/Python
• Design and implement internet application programs.
PURPOSE
• Today’s world is intertwined with technology
• Data analysis
• Simulation and modelling
• Control systems
• Industry readiness
ROLE IN TODAY'S TECHNOLOGY-DRIVEN
LANDSCAPE
• Simulation and Modeling: Engineers use code to create virtual prototypes for testing.
• Data Analysis and Visualization: Code helps analyze engineering data and visualize
results.
• Control Systems and Automation: Code enables precise machinery control and
automation.
• Instrumentation and Measurement: Code interfaces with sensors for data
acquisition.
• Embedded Systems Development: Code powers embedded systems in various
engineering applications.
APPLICATIONS OF APPLICATION
PROGRAMMING:
Smart Grids:
o Smart grids use advanced electronics and software to optimize electricity generation, distribution, and
consumption, enhancing efficiency and reliability.
Electric Vehicles (EVs):
o EVs incorporate complex electrical systems and software to manage power delivery, battery charging, and
vehicle control, reducing carbon emissions.
Home Automation Systems:
o Smart home systems employ electronics and programming to automate and control lighting, HVAC, security,
and appliances for energy efficiency and convenience.
Wearable Electronics:
o Wearable devices, like fitness trackers and smartwatches, integrate sensors and software to monitor health and
collect data for user insights.
Industrial Automation:
o In manufacturing and industrial settings, automation systems leverage electronics, sensors, and software to
optimize production processes, ensuring efficiency and quality.
FUNDAMENTAL CONCEPTS OF
PROGRAMMING:
Core Concepts
• Variables: These act as containers for storing data, allowing programs to work with information
effectively.
• Data Types: Explain the various data types, such as integers, strings, and booleans, and how they
define the nature of data in a program.
• Control Structures: Discuss logic for decision-making, exemplified by if statements, and logic for
repetition, demonstrated through loops.
• Input and Output: Clarify how programs interact with users and the environment, taking input,
processing it, and producing output.
PROGRAMMING LANGUAGES
Scripting Languages Desktop Application Languages
• Scripts automate tasks, process data, and perform quick operations. • These languages are suitable for creating standalone
• Python: applications that run on desktop operating systems.
• Known for its simplicity and versatility Java:
• Used for scripting, web development, data analysis, and more. oKnown for platform independence, used for cross-
• Ruby: platform desktop applications.
• Used scripting, web development (Ruby on Rails), and prototyping C#:
oUsed for Windows desktop application development
(e.g., with .NET).
Web Development Languages:
• Languages designed for building web applications and websites, Mobile App Development Languages
including both front-end and back-end development.
• JavaScript: • Languages used to create mobile applications for various
• The primary language for front-end web development, enabling platforms.
interactive web applications. Swift:
• PHP: oDeveloped by Apple, used for app development.
• Mainly used for server-side web scripting and dynamic web
content.
Kotlin:
oOfficially supported for Android app development,
offering improved readability.
PROGRAMMING LANGUAGES
Systems Programming Languages Data Science and Analysis Languages
• Languages used for data manipulation, statistical analysis, and
machine learning.
• Languages designed for low-level system tasks, such as
R:
operating systems and hardware interaction. o Specialized for statistical analysis, data visualization, and data
C: modeling.
o Renowned for its performance, used for system development,
Python:
embedded systems, and more. o Widely used for data analysis, machine learning, and scientific
C++: computing.
o An extension of C, used for systems programming, game
Database Query Languages
development, and high-performance applications. Embedded and IoT Languages
• Languages specialized for interacting with and managing
databases. • Languages suitable for programming embedded systems and
SQL (Structured Query Language): IoT devices.
o Used for relational database management system (RDBMS) C and C++:
operations. o Widely used for programming microcontrollers, embedded
NoSQL Query Languages: systems, and IoT devices.
o Various query languages (e.g., MongoDB's query language) for Python:
NoSQL databases. o Used in embedded systems with microcontrollers like
Raspberry Pi.
WHY PYTHON FOR THIS COURSE
Python is a valuable tool for engineers across diverse domains:
o Enhances productivity
o Better collaboration
o Increased problem-solving capabilities.
WHY PYTHON FOR THIS COURSE
Rapid Prototyping:
o Python's simplicity and readability help engineers quickly develop and test engineering systems
prototypes.
Interdisciplinary Compatibility:
o Python's versatility helps seamless interfacing of various hardware components.
Data Analysis and Visualization:
o Python's rich ecosystem of libraries, including NumPy, SciPy, and Matplotlib, empowers engineers to
perform advanced data analysis and visualization tasks.
SPECIFIC USES OF PYTHON
Web development (server-side)
Software development
Mathematics
System scripting
FIRST APPLICATION
Check if Python is Installed
o Open command prompt and run the command: python --version
o Command can appear like this:
o C:\Users\Your Name>python –version
o Platform can be notepad or compiler:
o Write: print("Hello, World!")
FIRST APPLICATION
Running the script
o Navigate to directory the file is saved:
o E.g. C:\Users\Your Name>
o Run the command by typing: python filename.py, where filename is the name of your python
script. E.g. helloworld.py
o So the command is: python helloworld.py
o The output should read: Hello, World!
PYTHON SYNTAX
Python code must be indented for the compiler to interpret it appropriately.
Same spaces must be used in same block of code
Such a code below will result in error:
if 5 > 2:
print("Five is greater than two!")
Indenting must be done. The code below will run:
if 5 > 2:
print("Five is greater than two!")
COMMENTS
Explain Code
Comments starts with a #, and Python will ignore them
Multiline string use three single quotes at the beginning and at the end
CONT.
Q&A SESSION
Any questions
THANK YOU!