Skip to content

Commit 34939f6

Browse files
committed
Update Fahrenheit to Celsius Function code
Signed-off-by: Kunal Garg <kunalgarg2002@gmail.com>
1 parent 6824df1 commit 34939f6

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

7 Functions/Fahrenheit to Celsius Function.ipynb

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
"name": "stdout",
1010
"output_type": "stream",
1111
"text": [
12-
"0\n",
13-
"100\n",
14-
"20\n",
1512
"0 -17\n",
1613
"20 -6\n",
1714
"40 4\n",
@@ -22,26 +19,21 @@
2219
}
2320
],
2421
"source": [
25-
"\n",
2622
"def printTable(start,end,step):\n",
27-
" curr_temp = start\n",
28-
"\n",
29-
" while curr_temp <= end:\n",
23+
" for curr_temp in range(start, end+1, step):\n",
3024
" c = 5/9 * (curr_temp-32)\n",
3125
" print(curr_temp, \" \", int(c))\n",
32-
" curr_temp = curr_temp+step\n",
33-
"pass \n",
3426
" \n",
3527
"s = int(input())\n",
3628
"e = int(input())\n",
3729
"step = int(input())\n",
38-
"printTable(s,e,step)\n"
30+
"printTable(s,e,step)"
3931
]
4032
}
4133
],
4234
"metadata": {
4335
"kernelspec": {
44-
"display_name": "Python 3",
36+
"display_name": "Python 3.10.4 64-bit",
4537
"language": "python",
4638
"name": "python3"
4739
},
@@ -55,7 +47,12 @@
5547
"name": "python",
5648
"nbconvert_exporter": "python",
5749
"pygments_lexer": "ipython3",
58-
"version": "3.7.6"
50+
"version": "3.10.4"
51+
},
52+
"vscode": {
53+
"interpreter": {
54+
"hash": "369f2c481f4da34e4445cda3fffd2e751bd1c4d706f27375911949ba6bb62e1c"
55+
}
5956
}
6057
},
6158
"nbformat": 4,

0 commit comments

Comments
 (0)