Skip to content

Instantly share code, notes, and snippets.

@SatyakiDe2019
Created May 7, 2021 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SatyakiDe2019/ac2d7cdd893602b134551f43baea0d83 to your computer and use it in GitHub Desktop.
Save SatyakiDe2019/ac2d7cdd893602b134551f43baea0d83 to your computer and use it in GitHub Desktop.
##############################################
#### 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