Skip to content

Instantly share code, notes, and snippets.

@prajwal-stha
Created May 11, 2020 02:52
Show Gist options
  • Save prajwal-stha/2d49dc18bcb1d76c993fef84d942d30d to your computer and use it in GitHub Desktop.
Save prajwal-stha/2d49dc18bcb1d76c993fef84d942d30d to your computer and use it in GitHub Desktop.
import math
import random
random.seed(5)
def sigmoid(x):
return 1 / (1 + math.exp(-x))
for x in range(3):
random_num = random.randint(0,3)
print('The random number is {}'.format(random_num))
print('The output is and {}'.format(sigmoid(random_num)))
for x in range(3):
random_num = random.randint(3,60)
print('The random number is {}'.format(random_num))
print('The output is and {}'.format(sigmoid(random_num)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment