Skip to content
프로젝트

AceLewis/my_first_calculator.py

GitHub에서 보기

AceLewis/my_first_calculator.py has 4,350 GitHub stars and 493 forks. GitHot measured +1 stars in 24 hours and +4 in 7 days. Last checked 2026-11-12 09:53 UTC. Last push 2024-08-04.

이 수치를 측정하는 방법

my_first_calculator.py

측정된 스타 증가

in 24h
+1
in 7 days
+4
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

my_first_calculator.py

I initially saw Al Sweigart's my_first_tic_tac_toe and was amused. I then saw the image shown below posted on Reddit. Assuming that the image was not made up for some fake internet points and also assuming that their friend only used addition, subtraction, multiplication and division then the number of numbers that they would have if statements for would be...

sqrt(9500/4) = 48.7339...
sqrt(9500/4) ≈ 50 

So to be true to the "real" story I have only gone from 0-50 however higher numbers can easily be generated too however my Python crashes with larger numbers. I generated one that was 0-1000 and it took up 317 MB of space on my hard drive but was only 20MB after I compressed it to a .rar so I have also attached it.

The generator will not work in Python 2 however it can probably be patched to work by doing from __future__ import division

The image

관련 프로젝트 살펴보기