Viewing creations from @generor · Showing public creations only.
This Rust function simulates rolling two 100-sided dice, generating two random numbers between 1 and 100 (inclusive) and returning them as a tuple. It utilizes the `rand` crate for secure random number generation.
This function simulates rolling 100 standard six-sided dice, generating an array of 100 random integers, each between 1 and 6.
This function performs a Monte Carlo simulation to estimate the value of Pi by randomly generating points within a square and checking how many fall within an inscribed circle's quadrant.
A comprehensive Monte Carlo simulation function to estimate the value of pi by randomly sampling points in a unit square and determining the ratio that fall within a quarter circle.
This C++ program simulates Earth's circular orbit around the Sun by calculating and displaying its position at regular time intervals using trigonometry. It outputs positions to the console with moderate comments explaining the physics and code logic.
This Python script displays a table showing each month of a specified year, its total number of days, and the count of Saturdays within that month, correctly accounting for leap years.
This Python script calculates and displays the number of days and Saturdays for each month of a specified year. It utilizes the 'calendar' module to efficiently determine month ranges and weekly day occurrences.