Week 2: Python for Mathematicians
Additionally, during this week I also presented some codes to few of my classmates. There were different programs that we discussed but one problem that I would like to mention is the famous problem (1+1/n)^n as n approaches to infinity. Its answer approaches to e.
import cmath
n=1
sum=(1+1/n)**n
error=cmath.e-sum
print('itr e approx error')
print(f'{n} {cmath.e} {sum} {error}')
while(error>0.01):
n=n+1
sum=(1+1/n)**n
error=cmath.e-sum
print(f'{n} {cmath.e} {sum} {error}')
print(f'approx: {sum}')
print(f'original: {cmath.e}')
print(f'error: {error}')
print(f'n: {n}')
Looking forward to the presentations coming up on weekend.
Special mention of our mentors:
Leader: Ma'am Afsheen Ghuman
Nice effort by Moderators: Ma'am Zartashia Afzal , Ma'am Shafaq Aslam
Special mentions: Ma'am Fatima Malik ,Sir Ubaid Ur Rehman
Special thanks: Dr. SARFRAZ AHMAD , DR. Zafar Shahid, PhD
Thank you iCodeGuru for providing us the platform.
Hassan Aftab Great recap of the whole week! ?? You have written this article nicely. Keep up the hard work.
Software Engineer | Section Leader @ Stanford Code in Place | Moderator @ icodeGurru
4 个月Keep up the good work
Student @Stanford CiP'24 | x-Lecturer | Python Instructor | Html | CSS | Python | C++
4 个月Really proud of you. Well done. You showed great writing skills, just like in coding.
Grad Assistant @GVSU || Silver ?? Brick at CALICO 2024 || Laravel Developer || Python || AI Enthusiast || LeetCoder || DSA/Leetcode Trainer & Moderator at @iCodeGuru || Computer Scientist
4 个月Very well done... Keep going at the end of the session you will have added lots of new skills in your skill set. ????
WordPress Designer & Developer | WordsprintDevelopersHackathon Winner X2???? | CGPA 3.77/4.0 | Trainer @ iCodeGuru ??
4 个月Very well summarised.. keep up your good work.