Skip to content
RonitMehta08Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

📘 Introduction to Python – Notebook Journal

File: EXPERIMENT_1_Introduction_to_Python.ipynb
Experiment Title: Introduction to Python
Author: Ronit Mehta
PRN: 25070123094


🎯 Aim

To study the basic concepts of Python programming, including variables, data types, input/output operations, arithmetic operations, mathematical functions, and conditional statements.


📖 Theory

Python is a high-level, interpreted, and dynamically typed programming language known for its simplicity and readability.

Key concepts covered in this experiment:

  • Variable declaration and assignment
  • Printing output using print()
  • Data types and type checking using type()
  • Arithmetic operations
  • User input using input()
  • Mathematical operations using the math module
  • Conditional statements using if–else

Python is widely used in data science, web development, automation, and artificial intelligence due to its rich libraries and ease of use.


🧠 Algorithm (Cell-wise)

Cell 1 – Student Details

  1. Display student name and PRN using markdown.

Cell 2 – Experiment Title

  1. Display the title: Introduction to Python.

Cell 3 – Variable Assignment and Printing

Algorithm

  1. Assign multiple values to multiple variables in a single statement.
  2. Print all variables together.
  3. Print a single variable.

Output orange apple banana orange


Cell 4 – Data Types

Algorithm

  1. Assign integer, float, string, and boolean values to variables.
  2. Use type() to display the data type of each variable.

Output <class 'int'> <class 'float'> <class 'str'>


Cell 5 – Arithmetic Operations

Algorithm

  1. Assign values to two variables.
  2. Perform addition, subtraction, and multiplication.
  3. Display results using print().

Output add = 15 subt = 5 mult = 50


Cell 6 – User Input and Addition

Algorithm

  1. Accept two integer values from the user.
  2. Add the values.
  3. Display the result.

Output (example) Enter Value of X: 5 Enter Value of Y: 6 sum = 11


Cell 7 – Area of a Circle (Basic Formula)

Algorithm

  1. Accept radius as user input.
  2. Calculate area using formula:
    area = 3.14 × r²
  3. Display the area.

Output (example) Enter Radius: 7 153.86


Cell 8 – Mathematical Functions Using math Module

Algorithm

  1. Import the math module.
  2. Accept radius as input.
  3. Use:
    • math.log10()
    • math.pi
  4. Perform and display calculations.

Output (example) Enter Radius: 10 2.302585092994046 31.41592653589793


Cell 9 – Logarithmic Functions

Algorithm

  1. Import the math module.
  2. Calculate natural logarithm using math.log().
  3. Calculate base-10 logarithm using math.log10().

Output 0.9162907318741551 2.0


Cell 10 – Conditional Statement (if–else)

Algorithm

  1. Assign values to two variables.
  2. Compare values using an if–else condition.
  3. Display appropriate output based on condition.

Output b is greater than a


✅ Conclusion

This experiment introduced the fundamental concepts of Python programming, including:

  • Variable declaration and data types
  • Input and output handling
  • Arithmetic and mathematical operations
  • Use of built-in and library functions
  • Conditional logic using if–else

Understanding these basics forms a strong foundation for advanced Python programming and real-world application dev

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages