Tag: python basics

Python Essentials | Python Basics Tutorial

In this Python tutorial, you will learn about some essentials of Python. The topics that we are going to discuss are:

  • Statements
  • Expressions
  • Multiline Statements
  • Indentation
  • Comments
  • Identifiers
  • Keywords
  • Naming Convention

Read More

Python Variables( Global, Local, Nonlocal) , Constants

Hellow Programmers, In this python tutorial I am gonna talk about variables & their types. So What is Variable?

Variable: Think about an empty pot in which you can put anything. In programming we call it variable. Actually a variable is an empty memory location to store values.

How to declare a variable in python?

Declaring a variable in python is a piece of cake. Name it & put a value into it. As python is a dynamically typed language we don’t need to declare variable types. Python is smart enough to detect the type itself.

There are some rules of declaring variables:

  • A variable name must start with a letter or the underscore character.
  • Cannot start with a number.
  • A variable name can only contain alpha-numeric characters and underscores. For example, anything like this is valid: A-z, 0–9, and _
  • Variable names are case-sensitive (height, Height, and HEIGHT are three different variables names)

Read More

Powered by WordPress & Theme by Anders Norén