❌

Reading view

There are new articles available, click to refresh the page.

July 10, 2024 Python | DataTypes, Variables, Constants

This is a series of Python learning blog from parottosalna community by kaniyam foundation

This blog is based on this video Python | DataTypes, Variables, Constants | ParottaSalna"

To watch the full series check this youtube playlist

Contents

  1. Datatypes
  2. Variables
  3. Constants
  4. General Notes

Datatypes:

  • 3 Types of Datatypes

    1. Numeric
      1. Integer
      2. Float / Decimal number
      3. Constants
    2. Text
    3. Boolean Types
      • True, False, None
      • Examples:
        • is_active = true
        • no_of_apples = none
  • Command to check the input type type(26) , Output will be int datatype

  • Everything in Python Language is "Object"

  • Command to see functionalities of a Object dir(26) , Output show the available functionalities as a list.

  • str is the short form of String.

  • Addition of Strings

    • "Vishal" + "J" , The Output will be VishalJ

Variables:

  • Variable is a container to hold the values. And Variables will refer to Object / Value / Data.

  • There are some regulations in variable writing

    1. No symbol in-between
    2. Only start with Characters.
  • Command for Multiple assignment

    • name, age = "Vishal", 20
      • Here is a example of tuple data type
  • Command to print the datatype in a program

    • print(type(name))
  • Running inspect - terminal option in browser to use JavaScript program

  • Commenting is useful to denote what is going in a program

    • To comment single line #
    • To comment multiple lines """Hello world """

Constants:

  • Types of Constants styles

    1. PascalCase
    2. Camelcase
    3. snake_case
  • Google Colab uses Jupiter notebook and into include automatic feature to print texts without print function

  • Book recommendation

    • Byte of Python
  • Quiz's and Tasks for Practising

  • File handling commands

    • Command to create a new file "file.txt" in F folder with program of print("Some content")
      • with open("file.txt", "w") as f: print("some content", file=f)
  • Concatenate make to add two strings as metioned in above before

    • print("Hello" + " World" , the Output will be Hello World
    • print("Hello" , "World") , The Output will be Hello World . Here the the , symbol will add some space between the words.

General Notes

  • By using Books you can use to self study and to advance

  • Note: We can paste images in Zoom chat option

  • To learn JavaScript one must have to know HTML

  • Forums to ask questions

    1. Stack overflow
    2. Chennai mailing list
    3. Tamil Linux Community

July 9, 2024 Print() Python (Q/A) - Part 2

This is a series of Python learning blog from parottosalna community by kaniyam foundation

This blog is based on this video "Print() Python (Q/A) | ParottaSalna - Part 2](https://youtu.be/OWjW7GBMND4?list=PLiutOxBS1Mizte0ehfMrRKHSIQcCImwHL)"

To watch the full series check this youtube playlist

Contents:

  1. Websites to learn programming for beginners
  2. Python installation in windows

Websites to learn programming for beginners

https://code.org/
https://scratch.mit.edu/

To use python in windows

  1. Install the python .exe file and select the option "Add python to environment variables"
  2. Create python file in text editor and save it in a folder
  3. Go to the file location in the windows explorer and in the location path enter cmd to open the file path in terminal
  4. In terminal to execute the python program enter python <file name>
  5. To check the available file in the folder enter dir

July 9, 2024 Print() - Part 1

Contents:

  • About print function and its arguments
    • Sep argument
  • Different types of print formats
  • Using escape sequences with print function
  • Rasting - To insert file path
  • Typecasting - To change data format to another format
  • Learnt about how to print multi line string
  • Sting Multiplication
  • Different methods of print formats like F String
  • To see the different methods for a function by using dir command before a function
  • Usages of print function

  • `print("")

    • This is call as print function
  • Different cases with print() function

    • print("Hello", "World") \Seperator
      • Output: Hello World
        • There is a space between two words due to default sep argument
    • print("Hello", "World", sep="-")
      • Output: Hello-World
    • print("Hello", "World", sep="\n") \ Enter or new line
      • Output: Hello World
    • print("Hello", "World", sep="\t") \Tab
      • Output: Hello World

Cancatinating string

  • In Python language, every thing is consider as objects, every object has special functionalities.

  • print("Hello" + " World" + "Welcome" + " To Python Class")

    • Output: Hello WorldWelcome to Python Class
  • print("Hello", "World", end="?"

    • Output: Hello World?

Ecape Sequence

  • For print pattern
    • print("#\n##\n###\n#####")
    • output: # ## ### ####
  • Some Escape sequences
    • \n
    • \t

Rasting

  • To inset print native file path

  • print(r"C:\users/syedajafer/document")

    • Output: C:\users/syedajafer/document
  • Insert double quatation the value will be in string

Type casting

  • print("abc" + str(123))

    • Output: abc123
  • To add Quatations in a string

    • print(' "Hello world"')
      • Output: "Hello world"
    • print(" 'Hello world' ")
      • Output: 'Hello world'

Multi line string

  • To print as paragraph print(""" My Name is Vishal. How are you? What is your name? """)
  • Output: My Name is Vishal. How are you? What is your name?

String Multiplication

  • print("Hello" * 3)
    • Output: HelloHelloHello
  • print("Hello" * 3 *2)
    • Output: HelloHelloHelloHelloHelloHello

Format

`
name = "abc"
age = 25
print("Name: {}, Age:{}".format(name, age))

Output:
Name: abc, Age: 25
`

  • print("Name: {name}, Age: {age}" .format(name="abc", age=25))

Output: Name: abc, Age: 25
`

  • ` print("Name: {name}, Age: {age}" .format(name=["abc"], age=25))

Output: Name: ['abc'], Age: 25
Note: It will also print the strings in list data Structure
`

  • F string ` name = "Syed" age = 26 print(f"Name: {name}, Age: {age}")

Output: Name: Syed, Age: 26
`

  • "Hello World" * 2

    • Output: Hello WorldHello World
    • Use can use printfunction without print function syntax
  • To see available methods for a function use dir

Usages of print() function

  • software development while debugging by checking what is the result at each stages
  • While going to production, they remove print function and insert log key
  • Desktop application to print the status

July 8, 2024 Python Meet & Greet - Part 2

This is a series of Python learning blog from parottosalna community by kaniyam foundation

This blog is based on this video "Python Meet & Greet - Part 2 | Parotta Salna" - Day 1 of Python learning Introduction class

To watch the full series check this youtube playlist

Objectives

  1. Introduction to Python Program
  2. About Linux user groups and their activites in Tamilnadu
  3. Contact numbers and links
  4. Forum questions asking methods
  5. Today Tasks
  • Linux groups and meetups in tamilnadu

  • To get updates for the linux meetups you can check the kaniyam.com website calender

  • The know for meetups check for meetup.com

  • These groups are volunteer group for knowledge sharing

  • GNU Linux

  • Windows or Mac are properaty software

  • Linux is made by the people for the people

  • GNU image for alternative photoshop

  • The only thing is after modify the software, it should be reelase it with original license

  • muthuramalingam tamil python - Youtube channel

  • To eliminate Thayakkam

    • This is what i know, and I am sharing it with you
  • By asking questions in forums you are creating a knowledge database

  • Ask questions in mailing list in chennaipy.org

  • By using tanglish you are not strong in either english or in tamil.

  • Things to remember when asking question

    • Don't ask your questions in one line
    • If possible add error code
    • If you have any question, always ask in public
  • Programming is like cooking

  • UI/UX - Javascript or HTML or CSS

  • Srinivasan is using Ubuntu KDE distribution of Linux

  • Srinivasan's Phone number: 9841795468

  • Dhanasekaran and Srinivasan is organising the class

  • Every week saturday teaching reactJS

  • Today Exercise

    • Install Python
    • Login in colab
  • Freetamilebook.com

  • python books

  • Telegram link: https://t.me/+2Q_uTW7j9xtkMmVl

July 8, 2024 Python - Meet & Greet - Part 1

This is a series of Python learning blog from parottosalna community by kaniyam foundation

This blog is based on this video "Python - Meet & Greet - Part 1 | ParottaSalna" - Day 1 of Python learning Introduction class

To watch the full series check this youtube playlist

Objectives:

  1. Why Python ?
  2. Course Syllabus
  3. Python Installation - Windows, Linux
  4. Collab Notebook
  5. Where to see updates & recordings.
  6. Where to ask questions ?
  7. Our Expectations
  8. Basic Print Command
  9. About FOSS, FOSS Communities.
  • Applications of Python language

  • Syllabus

  • Resources provided the team

    1. Blog
    2. Infographic PDF with important concepts
    3. Quiz
    4. Task like exercises
  • Learn -> Write blog -> Teach someone

  • python is open source

  • Python Colab in google for temperavery

    • Each program set is called cell
  • To ask questions

    • Ask in Tamil linux forum
    • Direct question in whatsup after class upto 2 hours
    • Few minutes before the class
  • To check updates for class

    • Check in Kaniyam website
    • Check in python syllabus session
    • Youtube channel live notification
    • Direct message to mentors
  • To find answer for my question

    1. First check in google search
    2. Then ask question
  • Expectations

    • To write blog notes after each classes
  • Programming

    • Print command
      • print("") this the format of the print command
      • To run the code python print or python print.py
  • Python is ready install in linux, if not install it with brew command

  • Mentor will use VScode and colob for teaching

  • Telegram link: https://t.me/+2Q_uTW7j9xtkMmVl

15-07-2024 Day 4 Python learning

This is a series of Python learning blog from parottosalna community by kaniyam foundation

This blog is based on this video Operators, Conditionals, Input | Python | ParottaSalna"

To watch the full series check this youtube playlist

  • Colab Notebook link

  • Creating a calculator

  • single division gives result in flat value

  • calculator include arithmetic operations like Addition, subtraction, division,
    modules - to find the remainder; modules have the symbol of percentage %

  • num1 = int(input("Enter Number 1"))
    mum2 = int(input("Enter Number 2"))
    result = num1+num2
    print("result is", result)

❌