Python Classroom Series – 25/Feb/2020

Python’s Culture

  • Readability Counts
    • PEP-8 (Style Guide) and PEP-20 (Zen Of Python)
    • To maintain readability, we have significan Whitespace

Python Terms

  • Program/Application will have collection of modules
  • Module introduction:
    • Lets calculate number of ways of selecting 3 oranges from a basket of 10 oranges
    10!/3! * (10-3)!
    
    • Solution in python:
      • Python has a math module and this module has factorial function.
      import math
      n=10
      r=3
      math.factorial(n) / (math.factorial(n-r) * math.factorial(r))
      

Getting Started with simple python programs

  • Create a file with name learning1.py
  • Lets ask user to enter any input and lets display the same input as output

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin