Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 384 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 384 Bytes

random number or array element

Build a function, random_range, that takes 2 parameters, start_num and end_num. OPTIONALLY: If start_num is an array instead (and end_num isn't specified), then it returns a random element from the array

  • Example:
    • random_range(2,15)
      • returns 7
    • random_range(1,100)
      • returns 85
    • random_range(['a','b','c','d','e'])
      • returns 'b'