mardi 23 février 2016

Finding latest value in the list of numbers

import random

def main():

numbs = []
numbs2 = []
numbsList = []


for i in range(10):
    numbsList.append(random.randrange(1,100))

numbs = str(numbsList)
numbs=numbs.replace('[','')
numbs=numbs.replace(']','')
numbs=numbs.replace(',','')

print('Here is the original list: ')
print(numbs)
print('The largest value in the slice is: ')
print( 'is at index 2 in the slice.')

main()

I'm having trouble finding the "largest value in slice".




Aucun commentaire:

Enregistrer un commentaire