@valoro/

ordenar_numeros2

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.534940865608317","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJhbmRvbQpMPVtyYW5kb20ucmFuZGludCg4MCwgOTkpXSAjZXN0ZSBlcyBMWzBdCmk9MQp3aGlsZSBpPDEwOgogIHg9cmFuZG9tLnJhbmRpbnQoODAsOTkpCiAgZm9yIGogaW4gcmFuZ2UoMCwgbGVuKEwpKToKICAgIGlmIExbal09PXg6CiAgICAgIGJyZWFrCiAgZWxzZToKICAgIEwuYXBwZW5kKHgpCiAgICBpKz0xCnByaW50KEwpCnByaW50KHNvcnRlZChMKSk="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
import random
L=[random.randint(80, 99)] #este es L[0]
i=1
while i<10:
  x=random.randint(80,99)
  for j in range(0, len(L)):
    if L[j]==x:
      break
  else:
    L.append(x)
    i+=1
print(L)
print(sorted(L))