랜덤 함수 0.0 ~ 1.0 이하의 임의의 값 print(random()) 0.0 ~ 10.0 이하의 임의의 값 print(random() * 10) 0.0 ~ 10 이하의 임의의 값 (정수) print(int(random() * 10)) 1 ~ 10 이하의 임의의 값 (정수) print(int(random() * 10) + 1) 1 ~ 45 이하의 임의의 값 (정수) print(int(random() * 45) + 1) 1 ~ 45 미만의 임의의 값 생성 print(randrange(1, 46)) 1 ~ 45 이하의 임의의 값 생성 print(randint(1, 45))...
[Python] 랜덤 함수에 대한 요약내용입니다.
자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.