Python Classroom notes 29/May/2026

Python

  • Python language can be used for different purposes

    • Scripting
    • Programming
      • Web
      • ML
      • Functional
      • Data
  • The python which we install is C-Python, there are other flavors

    • Anaconda
    • Jython
    • Iron Python
  • Python is a dynamically typed language

  • Python has prinicples which are referred as Zen of Python

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

REPL

  • Stands for Read Evaluate Print Loop
  • Launch a terminal and type python
  • in this you write and expression
x = 5

Preview

Operators

Datatypes

  • Python simple data types

    • int
    • float
    • str
    • bool
  • Playground

    • REPL
    • Prompt: Act as Python REPL and i will enter expression evaluate and give me the response

Problems:

  • Understand how python evaluates the expression

Simple intrest

  • Formulae:
p * t * r/100
  • Give me total amount
p + p * t * r / 100
  • Exercise: Drill deeper into how python evaluates expressions, Consider Operator precedence

  • Prompt:

Im begineer to python
Explain how python evaluates expressions
My current topic is operator precedence

Give me detailed step by step explanation of 
   operator precedence done correctly
   operator precedence done wrongly

with simple formulaes

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading