-
-
Save SatyakiDe2019/ac2d7cdd893602b134551f43baea0d83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
#### Written By: SATYAKI DE #### | |
#### Written On: 06-May-2021 #### | |
#### #### | |
#### Objective: Main calling scripts for #### | |
#### normal execution. #### | |
############################################## | |
from timeit import default_timer as timer | |
def vecCompute(sizeNum): | |
try: | |
total = 0 | |
for i in range(1, sizeNum): | |
for j in range(1, sizeNum): | |
total += i + j | |
return total | |
except Excception as e: | |
x = str(e) | |
print('Error: ', x) | |
return 0 | |
def main(): | |
start = timer() | |
totalM = 0 | |
totalM = vecCompute(100000) | |
print('The result is : ' + str(totalM)) | |
duration = timer() - start | |
print('It took ' + str(duration) +' seconds to compute') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment