Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Experiment Name: Introduction to Python

Objective: The objectives of the experiment are


1. To get a introduction about Python.
2. To learn basic theorems and techniques of numerical analysis by Python.
3. To be introduced with Engineering Tools like MATLAB, Python Software.
4. To learn the basic of Python like uses of Loops, Conditions, Arrays, Function.
5. To increase the idea about Problem solving.

Description: In this experiment, we can learn real-life coding using PyCharm, the dedicated
code editor for Python. Our focus is on knowing code snippets for loops, control statements,
arrays, and functions. This hands-on experience aims to increase our understanding of
Python programming, providing a practical foundation essential for achieving proficiency in
numerical analysis. By actively engaging with these fundamental concepts, we not only
enhance our coding skills but also open the way for successfully applying Python in solving
real-world numerical problems. This immersive session in PyCharm serves as a stepping
stone towards our goal, empowering us to navigate the intricacies of numerical analysis with
confidence and practical insight. For this experiment first we have to open the PyCharm and
create our own file and start to coding. Here some basic codes are added
Variables: A variables is the name given to a memory location in a program for example,
First Program:

Loops: Sometimes we want to repeat a set pf statements in our program for instance : Print
1 to 1000.
Loops make it easy for a programmer to tell the computer , which set of instructions to
repeat and how!
While: The syntax of while loop looks like this :
While Condition :
#Body of the loop.
Here is the example,
for : A for loop is used to iterate through a sequence like list, tuple or string .

Conditional: In Python programming too, we must be able to execute instructions on a


Condition(s) met. This is what Condition are for!
If:
If,elif,else:
Array: Arrays are used to store multiple values in one single variable.
Example:

Factorial practice with function:


Conclusion: This journey through Python's basics—loops, arrays, functions, and conditions—
has equipped me with essential tools for approaching numerical analysis. Python's user-
friendly nature has made learning enjoyable, providing a practical platform for mastering
these fundamental concepts.

Recognizing the role of these skills, I understand the importance of building a strong
foundation. This knowledge not only aids in immediate problem-solving but also lays the
groundwork for more advanced applications in numerical analysis.

As I progress, I look forward to the ongoing exploration of Python's capabilities, anticipating


a seamless transition from basic understanding to proficient application. This learning
adventure has sparked my curiosity, and I'm eager to tackle more intricate numerical
challenges with newfound confidence.

You might also like