250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- CSS
- discard()
- count()
- remove()
- JS
- __annotations__
- 오버라이딩
- __len__
- locals()
- fnmatch
- MySqlDB
- MySQL
- shuffle()
- __getitem__
- decode()
- randrange()
- choice()
- inplace()
- shutil
- HTML
- glob
- 파이썬
- Database
- fileinput
- zipfile
- __sub__
- mro()
- node.js
- items()
- View
Archives
- Today
- Total
목록shuffle() (1)
흰둥이는 코드를 짤 때 짖어 (왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!왈!)

1. 랜덤(random) 모듈 임의의 숫자를 무작위로 반환 1-1. random() 0이상 1미만의 실수 중에서 무작위로 하나를 뽑아 반환 In [9]: import random num = random.random() print(num) num = num * 10 print(num) num = int(num) # 0 ~ 9까지 정수 print(num) num = num + 1 # # 1 ~ 10까지 정수 print(num) 0.38020375522970495 3.8020375522970493 3 4 In [ ]: # 1 ~ 10까지 정수 num = int(random.random() * 10) + 1 print(num) 1-2. randRange() 원하는 범위를 입력하여 범위의 부작위 정수를 반환 In..
파이썬 기초
2023. 3. 9. 14:26