Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help on first function
#2
You aren't printing anything - you just throw away the value returned by randint.

Note that without the function, the value is printed only because you're at the REPL - its job is to print out the value of expressions ('P' in 'REPL' is for "print"). If you had written the loop in a script and run it, you'd see nothing printed.
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