Skip to content

Instantly share code, notes, and snippets.

@soesandanwe
Created March 4, 2019 11:35
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 soesandanwe/d43d44a140bd4e788a35b18f420e53b6 to your computer and use it in GitHub Desktop.
Save soesandanwe/d43d44a140bd4e788a35b18f420e53b6 to your computer and use it in GitHub Desktop.
WastefulLemonchiffonBots created by soesandanwe - https://repl.it/@soesandanwe/WastefulLemonchiffonBots
import random
L_size=int(input("Please enter the length for the list: "))
Lower_b=int(input("Please enter the lower bound for the range of integer values: "))
Upper_b=int(input("Please enter the upper bound for the range of integer values: "))
if Lower_b>Upper_b:
print ( "Lower bound is greater than Upper bound." )
else:
L=[]
for _ in range(L_size):
num = random.randrange(Lower_b,Upper_b)
L.append(num)
print ("Sequence: ",L)
print ("Largest Integer: ",max(L))
print ("Smallest Integer: ",min(L))
print ("Sum: ",sum(L))
print ("Average: ",sum(L)/L_size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment