{ "cells": [ { "cell_type": "code", "execution_count": 12, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "24u2sy3faT5O", "outputId": "7e24d69e-44ec-4830-bf35-2ba0b3d78999" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Enter No1: 10\n", "Enter No2: 10\n", " \n", "20\n" ] } ], "source": [ "a = int(input(\"Enter No1: \"))\n", "b = int(input(\"Enter No2: \"))\n", "\n", "print (type(a), type(b))\n", "print(a+b)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "oDREKbiumn5a", "outputId": "dfd16a44-25e4-4f69-de3a-e125be6d0864" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Line1 Pakistan \n", "Line2 Pakistan \n", "Line3 Pakistan\n", "\n", "\n" ] } ], "source": [ "data = \"\"\"\n", "Line1 Pakistan \\nLine2 Pakistan \\nLine3 Pakistan\n", "\n", "\"\"\"\n", "print(data)" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "xXr25A3MtdjA", "outputId": "1364a6a8-82ef-41b7-f490-eb615066db17" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "NED UNIVERSITY \n", "Student Name: Syed Usman Ghani\n", "Father's Name: Younus Hussain\n", "Roll No: 300\n", "Contact No: 03452935995\n" ] } ], "source": [ "stname = \"Syed Usman Ghani\"\n", "fname = \"Younus Hussain\"\n", "roll_no = 300\n", "cont_no = \"03452935995\"\n", "\n", "card = \"NED UNIVERSITY \\nStudent Name: \" + stname + \"\\nFather's Name: \" + fname +\\\n", "\"\\nRoll No: \" + str(roll_no) +\\\n", "\"\\nContact No: \" + cont_no\n", "\n", "print (card)" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "aaUvTYmmzcJQ", "outputId": "5a469211-b58f-44b2-d46f-3332165ed1ea" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "-----------------------------\n", "\n", "NED UNIVERSITY \n", "Student Name: \t\tSyed Usman Ghani\n", "Father's Name: \t\tYounus Hussain\n", "Roll No: \t\t300\n", "Contact No: \t\t0345-2935995\n", "\n" ] } ], "source": [ "stname = \"Syed Usman Ghani\"\n", "fname = \"Younus Hussain\"\n", "roll_no = 300\n", "cont_no = \"0345-2935995\"\n", "\n", "card = f\"\"\"\n", "NED UNIVERSITY\n", "Student Name: \\t\\t{stname}\n", "Father's Name: \\t\\t{fname}\n", "Roll No: \\t\\t{roll_no}\n", "Contact No: \\t\\t{cont_no}\n", "\"\"\"\n", "print(card)" ] }, { "cell_type": "code", "execution_count": 36, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "7tMmKyfQ6u1Z", "outputId": "f66fceba-5352-40dd-e96f-ee0dd8588a78" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Enter Your Name: Syed Usman Ghani\n", "Enter Your Father's Name: Younus Hussain\n", "Enter Your Roll No: 12345\n", "Enter Your Cell No: 03452935995\n", "-------------------------------------\n", "\n", "NED UNIVERSITY\n", "\n", "Student Name: \t\tSyed Usman Ghani\n", "Father's Name: \t\tYounus Hussain\n", "Roll No: \t\t12345\n", "Contact No: \t\t03452935995\n", "\n" ] } ], "source": [ "stname = input(\"Enter Your Name: \")\n", "fname = input(\"Enter Your Father's Name: \")\n", "roll_no = input(\"Enter Your Roll No: \")\n", "cont_no = input(\"Enter Your Cell No: \")\n", "\n", "print (\"-------------------------------------\")\n", "\n", "card = f\"\"\"\n", "NED UNIVERSITY\n", "\n", "Student Name: \\t\\t{stname}\n", "Father's Name: \\t\\t{fname}\n", "Roll No: \\t\\t{roll_no}\n", "Contact No: \\t\\t{cont_no}\n", "\"\"\"\n", "print(card)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "TMeF3W0294dN" }, "outputs": [], "source": [] } ], "metadata": { "colab": { "provenance": [] }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.3" } }, "nbformat": 4, "nbformat_minor": 4 }