Python Forum
NEED HELP Pseudo-Random Numbers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NEED HELP Pseudo-Random Numbers
#7
when you do a return from a function, it returns the value, not the names under which that function stored the values.  when you return 2 values separated by a comma, you are returning a value which is a type known as a tuple, containing those 2 values.  you do need to call the function and do it in a way that properly uses the value the function will return, such as assigning that value to a variable, or to multiple variables.  you can also call a function and ignore the value it returns.

if you wish to have variables returned from a function, and have the code that called that function get the same names, it is possible to do.  but it is more complicated, requiring changes to how the function returns them and how the caller accepts them.  but, i suggest not ever thinking about something like that unless you have a specific reason to do it.  in my few years of programming in python, i have never encountered such a need.  i doubt if anyone here ever has, so i'm not going to explain how.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
NEED HELP Pseudo-Random Numbers - by Kongurinn - Oct-20-2017, 01:01 AM
RE: NEED HELP Pseudo-Random Numbers - by ichabod801 - Oct-20-2017, 01:04 AM
RE: NEED HELP Pseudo-Random Numbers - by Kongurinn - Oct-20-2017, 01:10 AM
RE: NEED HELP Pseudo-Random Numbers - by ichabod801 - Oct-20-2017, 01:20 AM
RE: NEED HELP Pseudo-Random Numbers - by Kongurinn - Oct-20-2017, 01:25 AM
RE: NEED HELP Pseudo-Random Numbers - by ichabod801 - Oct-20-2017, 02:10 AM
RE: NEED HELP Pseudo-Random Numbers - by Skaperen - Oct-20-2017, 04:00 AM
RE: NEED HELP Pseudo-Random Numbers - by Kongurinn - Oct-22-2017, 05:11 AM
RE: NEED HELP Pseudo-Random Numbers - by Larz60+ - Oct-22-2017, 08:37 AM
RE: NEED HELP Pseudo-Random Numbers - by Skaperen - Oct-23-2017, 04:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,479 Jan-02-2023, 05:08 PM
Last Post: deanhystad
  Convert list of numbers to string of numbers kam_uk 5 3,088 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Stein's GCD according to given pseudo code wanttolearn 2 2,029 Aug-27-2020, 07:58 PM
Last Post: wanttolearn
  Scaling random numbers within specific range schniefen 4 3,238 Oct-28-2019, 11:22 AM
Last Post: jefsummers
  How to Generate and Print An Array with Random Numbers in Python in the johnnynitro99293 14 9,757 Sep-20-2019, 11:56 AM
Last Post: ichabod801
  Write pseudo code for a class assignment Scrimshot 3 3,449 May-07-2019, 05:38 PM
Last Post: Scrimshot
  random numbers and stats cliffhop23 2 6,953 Feb-22-2018, 09:16 PM
Last Post: glidecode
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,151 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE
  List with Random Numbers AnjyilLee 5 9,453 Oct-14-2017, 09:22 PM
Last Post: buran
  pseudo code for a quiz tsaward 4 7,762 Sep-15-2017, 09:59 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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