Skip to content

Counting from 1 to 1 billion in Python, using FOR, WHILE and the NUMPY library

License

Notifications You must be signed in to change notification settings

leandrogomesmachado/python311-count-billion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python 3.11 - Counting to 1 billion

Counting from 1 to 1 billion in Python, using FOR, WHILE and the NUMPY library

Requirements

Run the following command to install numpy:

pip install -r requirements.txt

Environment test:

Test case was using Python 3.11.3:

image

Windows 11 version 22H2 build 22621.1702:

image

Computer Specs: image

The tests for both cases!

FOR:

py .\using_for.py

image

30.90 seconds

WHILE:

py .\using_while.py

image

83.56 seconds

NUMPY LIBRARY:

py .\using_numpy.py

image

1.46 seconds

About

Counting from 1 to 1 billion in Python, using FOR, WHILE and the NUMPY library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages