CogniTabScript documentation
/
📖Introduction & Syntax📋All APIsParallel execution / Concurrency
Classes16
  • Audio
  • Color
  • MacroPanel
  • MotionTracker
  • OverlayText
  • Point
  • Region
  • ScaleParam
  • ScreenCapture
  • Storage
  • SwipePoint
  • System
  • Template
  • TfliteModel
  • Timer
  • Touch
Read-only Classes7
  • AudioMatch
  • Flow
  • Match
  • MatchList
  • MotionResult
  • Recognition
  • TouchState
Collections6
  • dict
  • list
  • range
  • set
  • String
  • tuple
Functions36
Gesture
  • click
  • swipe
Input
  • text
Flow Control
  • print
  • random
  • random_int
  • range
  • wait
Collections
  • all
  • any
  • enumerate
  • globals
  • len
  • sorted
  • zip
Type Conversion
  • bool
  • float
  • hasattr
  • int
  • isinstance
  • str
  • type
Math
  • abs
  • ceil
  • clamp
  • cos
  • floor
  • log
  • max
  • min
  • pow
  • round
  • sin
  • sqrt
  • sum
  • tan
⚙️Runtime Specifications
On this page
  • Overview
Raw JSON source ↗
Ask ChatGPT↗

Get help with this page.

random

Function

Return a random floating-point number in the 0 -> 1 range.

Syntax

random()

Returns

Float — Random floating-point value in 0 -> 1 (1 is exclusive).

Example

chance = random()
if chance < 0.25:
    text("lucky")
Privacy PolicyTerms of UseCommunity GuidelinesAccount deletion

Release v2.107

Google Play
On this page
Overview
Raw JSON source ↗
Ask ChatGPT↗

Get help with this page.