IGS1131
Software Programming
Course Info
• Course Overview:
The course is designed for the students with no prior experience in programming.
The students will start with the most basic of all programming languages by
learning keyword and syntax using Python programming language. Eventually the
students will learn to design codes with control logic and develop the skills to solve
a problem using programming.
• Course Goal:
• Design algorithms to solve simple problems
• Use those algorithms in the Python programming environment
• Demonstrate the ability to correct, test and debug Python programs
Text and Reference Books
• Think Python: How to Think Like a Computer Scientist (How to Think Like a
Computer Scientist)
• Allen B. Downey
• ISBN: 9781491939369
Marks Distribution
Category Percentage
Mid-Term 30
Final-Term 30
Attendance 20
Assignment 20
Programming
Computer science is not computer programming. Programming is considered
the doorway to computational thinking:
• Solving problems
• Thinking on multiple levels of abstraction
• Decompose a problem into smaller set of problems
• Thinking in terms of algorithm (step by step process to solve a problem)
What is a program?
• A sequence of instructions that solves some problem (or achieves some effect) For
instance: Call your friend on the phone and give his/her instructions to find you. Or explain
how to cook a dish.
• Instructions are operations that the computer can already perform
• A program implements an algorithm (a step-by-step process for solving a problem)
What is debugging?
• A bug is a mistake in a program
• Debugging means to find the mistake and fix
it
• Kinds of errors:
• Syntax error
Occurs when the programmer makes a syntax
mistake during writing the code. This are
compiling time errors meaning the errors will
be identified before the program can run
• Runtime error
The code is syntactically accurate but
however runs into problem while executing
the program. For example, dividing something
by 0.
• Semantic error
The program runs perfectly but does not
produce a correct result. This usually are
logical errors.
Why programming?
• Embedded systems are now talk of the town which
was not even imagined 20/30 years ago.
• Many industries are moving towards automation and
many logistics are handled with automations. Even
many customer cares are handled with bots.
Everywhere you look you will find an example of
machines with codes
• Automobile industry has already become
inseparable with microchips and programming.
• Statistics, Data mining, Mathematics, Forecasting
everywhere they are using programming to gain
insight on the data
• Healthcare industry has also become dependent on
data technology and many countries have tons and
tons of data to go through.
• Experimental datasets are nowadays too large to be
handled manually.
C/C++
Overview: C is a powerful, low-level programming language often used for system programming and
applications that require high performance. C++ is an extension of C that includes object-oriented features.
Advantages:
High performance and efficiency, suitable for system-level programming.
Direct access to memory and hardware, which is crucial for embedded systems and game development.
Extensive use in legacy systems and critical infrastructure.
Python vs. C/C++:
Ease of Use: Python has simpler syntax and is easier to learn, making it more accessible for beginners.
Development Speed: Python allows for faster prototyping and development due to its simplicity and
extensive libraries.
Memory Management: Python manages memory automatically, whereas C/C++ requires manual memory
management, which can lead to bugs and security vulnerabilities.
Java
Overview: Java is a versatile, object-oriented programming language used for building platform-independent
applications, especially in web and enterprise environments.
Advantages:
Platform independence through the Java Virtual Machine (JVM), enabling cross-platform compatibility.
Strong memory management and security features.
Large ecosystem with robust libraries and frameworks.
Python vs. Java:
Syntax Simplicity: Python’s syntax is more straightforward and less verbose than Java, making it easier to write
and read.
Interpreted vs. Compiled: Python is an interpreted language, which offers more flexibility and quicker testing
cycles compared to Java's compiled nature.
Use in Data Science and Machine Learning: Python has a broader range of libraries and tools (like Pandas,
NumPy, and TensorFlow) specifically geared towards data science, machine learning, and AI.
R
Overview: R is a programming language specifically designed for statistical computing and data analysis.
It is widely used in academia and research environments.
Advantages:
Comprehensive statistical and graphical capabilities.
A large number of packages for various statistical methods and data visualization.
Strong support within the academic and research community for statistical analysis.
Python vs. R:
General Purpose vs. Specialized: Python is a general-purpose programming language that can be used
across many different fields, while R is specialized in statistical analysis.
Ease of Integration: Python integrates more easily with other programming languages and systems,
making it more suitable for production-level deployment.
Machine Learning and AI: Python has a more extensive ecosystem for machine learning and AI, with
libraries like TensorFlow, Keras, and Scikit-learn.
MATLAB
Overview: MATLAB is a high-level language and interactive environment designed for numerical
computation, visualization, and programming. It's widely used in engineering and scientific disciplines.
Advantages:
Excellent for mathematical modeling, simulations, and algorithm development.
Built-in support for matrix and vector operations, making it ideal for linear algebra and related fields.
Powerful visualization tools for plotting data and creating graphical interfaces.
Python vs. MATLAB:
Cost: Python is open-source and free, while MATLAB requires a paid license, making Python more
accessible.
Flexibility and Extensibility: Python offers more flexibility and extensibility through its large number of
libraries and integration capabilities.
Community and Ecosystem: Python has a larger and more diverse community, which contributes to its vast
library ecosystem, extending its applicability beyond numerical computing.