Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help on first function
#4
import random
>>> def rand():
for i in range(6): 
…   return random.randint(1,40)
 
>>> x = rand()
print(x)
I suppose you want this
Reply


Messages In This Thread
help on first function - by jip31 - Apr-27-2021, 04:12 PM
RE: help on first function - by ndc85430 - Apr-27-2021, 04:47 PM
RE: help on first function - by jip31 - Apr-28-2021, 12:22 PM
RE: help on first function - by raarkil - Apr-28-2021, 12:55 PM
RE: help on first function - by jip31 - Apr-28-2021, 02:09 PM
RE: help on first function - by snippsat - Apr-28-2021, 01:28 PM
RE: help on first function - by jip31 - Apr-28-2021, 02:22 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020