Created
March 4, 2019 11:35
-
-
Save soesandanwe/6da5ff4a3c8ad8f92066a8ca2d8d7719 to your computer and use it in GitHub Desktop.
WastefulLemonchiffonBots created by soesandanwe - https://repl.it/@soesandanwe/WastefulLemonchiffonBots
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
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
Testing python