@valoro/

aleatorios_con_excepciones_5

Python

http://altocodigo.blogspot.com/2018/08/aleatorios-con-excepciones.html

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.17799386893864644","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"IyBHZW5lcmFyIG7Dum1lcm9zIGFsZWF0b3Jpb3MgcGFyZXMgZW50cmUgMTAwIHkgMTMwLCBzYWx2byAxMTAgeSAxMjAuCiMgc2luIHJlcGV0aWNpw7NuCmltcG9ydCByYW5kb20KTD1baSBmb3IgaSBpbiByYW5kb20uc2FtcGxlKHJhbmdlKDEwMCwxMzEsMiksMTYpIGlmIGkgbm90IGluICgxMTAsMTIwKV0KcHJpbnQoTCkKTC5zb3J0KHJldmVyc2U9VHJ1ZSkKcHJpbnQoTCk="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
# Generar números aleatorios pares entre 100 y 130, salvo 110 y 120.
# sin repetición
import random
L=[i for i in random.sample(range(100,131,2),16) if i not in (110,120)]
print(L)
L.sort(reverse=True)
print(L)