'Inspiration 1 – 신청 희망자 사전 점검'에 답변달기

#11927
강태훈

강태훈입니다.

import numpy as NP

randomArray = NP.random.randint(1,11,20)
for i in randomArray:
if i <= 3:
print(“Low”, i)
elif 3 < i <= 6:
print(“Medium”, i)
else:
print(“High”, i)

<p class=”p1″><span class=”s1″>(‘Low’, 3)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 1)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 1)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 10)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 7)</span></p>
<p class=”p1″><span class=”s1″>(‘Medium’, 4)</span></p>
<p class=”p1″><span class=”s1″>(‘Medium’, 6)</span></p>
<p class=”p1″><span class=”s1″>(‘Medium’, 5)</span></p>
<p class=”p1″><span class=”s1″>(‘Medium’, 5)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 9)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 9)</span></p>
<p class=”p1″><span class=”s1″>(‘Medium’, 5)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 3)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 2)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 1)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 9)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 8)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 1)</span></p>
<p class=”p1″><span class=”s1″>(‘High’, 7)</span></p>
<p class=”p1″><span class=”s1″>(‘Low’, 2)</span></p>