Spreadsheet formulas (Google Sheets, Excel or LibreOffice Calc):
=RANDBETWEEN(1,6) a random whole number from 1 to 6 (one die roll)
=RAND() a random decimal from 0 up to (not including) 1
=IF(RAND()<0.7,1,0) 1 with probability 0.7, otherwise 0
=COUNTIF(A1:A1000,2)/1000 the relative frequency of 2s in cells A1 to A1000
Copy a formula down 1000 rows to run 1000 trials. Press F9 (or edit any cell) to rerun.
Spreadsheet tools for simulations. RAND() < 0.7 is true 70% of the time, so it models any event with probability 0.7.