{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ba919cf3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "# prtint Statement\n",
    "print(\"hello world\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "8b56b284",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Data Types\n",
    "# String\n",
    "name = \"Python\"\n",
    "# Integer\n",
    "age = 20\n",
    "\n",
    "# Float\n",
    "height = 5.9\n",
    "\n",
    "#Boolean\n",
    "is_language = True\n",
    "\n",
    "# List\n",
    "languages = [\"Python\", \"Javascript\", \"C++\"]\n",
    "\n",
    "# Tuple\n",
    "person = (\"John\", 25, \"New York\")\n",
    "\n",
    "# Dictionary\n",
    "person = {\"name\": \"John\", \"age\": 25, \"city\": \"New York\"}\n",
    "\n",
    "# Set\n",
    "numbers = {1, 2, 3, 4, 5}\n",
    "\n",
    "# Function\n",
    "def greet(name):\n",
    "    return f\"Hello, {name}!\"\n",
    "\n",
    "# Class\n",
    "class Person:\n",
    "    def __init__(self, name, age):\n",
    "        self.name = name\n",
    "        self.age = age\n",
    "\n",
    "    def say_hello(self):\n",
    "        return f\"Hello, my name is {self.name} and I am {self.age} years old.\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "c10a78a5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Python\n",
      "Python2\n",
      "hello both Python and Python2\n",
      "hello both Python and Python2\n"
     ]
    }
   ],
   "source": [
    "# String\n",
    "name = \"Python\"\n",
    "name2 = str(\"Python2\")\n",
    "\n",
    "print(name)\n",
    "print(name2)\n",
    "\n",
    "# concatenation\n",
    "print(\"hello both \" + name + \" and \" + name2)\n",
    "\n",
    "# Proper Concatenation from python 3.6\n",
    "print(f\"hello both {name} and {name2}\")\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c10db133",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n",
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "# Type Casing\n",
    "\n",
    "age = \"10\"\n",
    "casted_age = int(age)\n",
    "print(type(casted_age))\n",
    "print(type(age))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "685ca0c5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "14\n",
      "6\n",
      "2.5\n",
      "2\n",
      "10000\n"
     ]
    }
   ],
   "source": [
    "# Operators and expressions\n",
    "a = 10\n",
    "b = 4\n",
    "\n",
    "print(a+b)\n",
    "print(a-b)\n",
    "print(a/b)\n",
    "print(a%b)\n",
    "print(a**b) # this multiply a with b in terms of how many time can multiply "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
