{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello, World!\n" ] } ], "source": [ "print(\"Hello, World!\")" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "¯\\_(ツ)_/¯\n" ] } ], "source": [ "print(\"¯\\_(ツ)_/¯\")" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Hello, World!\n", " It's great to be here!\n" ] } ], "source": [ "print(\"\"\"Hello, World!\n", " It's great to be here!\"\"\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "str" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(\"Manoj\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "str" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(\"2.99\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "int" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(100)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.628894626777442\n" ] } ], "source": [ "print (pow(1.05, 10))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The temperature 75F in degrees celsius is 23.88888888888889C\n" ] } ], "source": [ "print(f\"The temperature 75F in degrees celsius is {(75 - 32) * 5 / 9}C\")" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The temperature 23.888C in Farehnite is 74.9984F\n" ] } ], "source": [ "print(f\"The temperature 23.888C in Farehnite is {(23.888 * 9 / 5) + 32}F\")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "8 ounce of water is equal to 236.588ml\n", "2000 ml of water is equal to 67.62811300657684ounce\n" ] } ], "source": [ "print(f\"8 ounce of water is equal to {8 * 29.5735}ml\")\n", "print(f\"2000 ml of water is equal to {2000 / 29.5735}ounce\")\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "I am 45 years old and my height is 5.11 feet\n" ] } ], "source": [ "age = 45\n", "height = 5.11\n", "print(f\"I am {age} years old and my height is {height} feet\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "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.11.4" } }, "nbformat": 4, "nbformat_minor": 2 }