Professional Documents
Culture Documents
Numerical Lab Sessional
Numerical Lab Sessional
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 .
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.