3. Dart - Built in Libraries 1

Importing Libaries:
    import 'LIBRARYNAME';

RNG Library:
    import 'dart:math';

Create a new RNG generator
    Random variable = new Random();

RNG:
    int variable = rand.nextInt(100);
        // rolls from 0 to 99 for the variable

Input Library:
    import 'dart:io';

Create a variable to hold input:
    String variable = stdin.readLineSync();

Converting String to int:
    variable = int.parse(variablestring);

Converting int to String:
    variablestring = variableint.toString();



Comments

Popular posts from this blog

2. FreeCodeCamp - Dynamic Programming - Learn to Solve Algorithmic Problems & Coding Challenges

20. Data Analytics - Analyze Data to Answer Questions - Week 1

3. Algorithms - Selection Sort