• Home
  • Python
  • About
  • Introduction

    Terminal commands

    > ls
    > ls -a
    > cd <directory_name>
    > cd ..
    > pwd

    Getting started

    > python3
    Python 3.10.6...
    >>> 2 + 2
    4

    Basics data types

    Type Python name Example
    Integer int 3
    Float float 3.14
    String str "Hello"
    Boolean bool True (or False)

    Variables

    Values can be assigned to variables.

    color = "Red"
    
    # Change color
    color = "Blue"

    Basic functions

    color = "Blue"
    
    print(color)
    color = input("What's your favourite color: ")
    Conditionals
    Github Back to the top