Raj Numeric
Raj Numeric
Description: From the lab we focused on practical applications of Python in the context of
numerical analysis. We were introduced to loops, variable , Array, Functions,
Conditions .Through hands-on exercises, we tackled challenges. Now I set here some examples
that I learned from the lab,
Variables: The use of variables was mastered to store and manipulate numerical data,
showcasing their significance in representing values during the analysis.
Loops: Python programming language provides two types of loops – For loop and While
loop to handle looping requirements. Python provides three ways for executing the loops.
While:
For:
Conditions:
If:
If else:
If,else,elif:
Array: An array is a collection of items stored at contiguous memory locations. The idea is to
store multiple items of the same type together. This makes it easier to calculate the position
of each element by simply adding an offset to a base value, i.e., the memory location of the
first element of the array (generally denoted by the name of the array).
Function: Python Functions is a block of statements that return the specific task. The idea is
to put some commonly or repeatedly done tasks together and make a function so that
instead of writing the same code again and again for different inputs, we can do the function
calls to reuse code contained in it over and over again.
Some Benefits of Using Functions
Increase Code Readability
Increase Code Reusability
Conclusion: In summary, this lab introduced me to essential Python concepts for numerical
analysis. I integrated loops for efficient calculations, mastered variables for precise data
manipulation, and employed conditions for dynamic decision-making.
Arrays enhanced my ability to handle structured numerical data, while functions provided a
modular approach to problem-solving. As i conclude, these foundational skills pave the way for
tackling more complex numerical challenges in my programming journey.