xFactorSchool.com
Python
JavaScript
How to Do Examples
C Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Compilers
C Compiler
C++ Compiler
C# Compiler
Java Compiler
Python Compiler
HTML Code Editor
CSS Code Editor
JavaScript Compiler
JavaScript Code Editor
Practice how to generate a random number in Python
Python Online Editor
Execute Code
More Python Sample Codes
import random # import random module to create randon number # To generate a random integer number between 100 and 999, use randint() function random_integer = random.randint(100, 999) print(random_integer) # To generate a random float number between 1 and 100 use uniform() function random_float = random.uniform(1, 100) print(random_float) #To generate a random float number between 0 and 1 use random() function random_float = random.random() print(random_float)