Spaces:
No application file
No application file
File size: 5,021 Bytes
5d07f20 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | {
"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",
"<class 'int'> <class 'int'>\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
}
|