@valoro/

ordenar_numeros6

Python

https://altocodigo.blogspot.com/2018/08/generar-numeros-aleatorios-sin.html

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.7337526591390822","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJhbmRvbQpMPWxpc3QocmFuZ2UoODAsMTAwKSkKcmFuZG9tLnNodWZmbGUoTCkgI2JhcmFqYSBsYSBsaXN0YQpMMTA9TFs6MTBdICNjcmVhIG90cmEgbGlzdGEgY29uIGxvcyAxMCBwcmltZXJvcyBlbGVtZW50b3MKcHJpbnQoTDEwKQpMMTAuc29ydChyZXZlcnNlPVRydWUpICNvcmRlbmEgbGEgbGlzdGEgTDEwCnByaW50KEwxMCk="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
import random
L=list(range(80,100))
random.shuffle(L) #baraja la lista
L10=L[:10] #crea otra lista con los 10 primeros elementos
print(L10)
L10.sort(reverse=True) #ordena la lista L10
print(L10)