<p>Additionally, how can I format it as a string padded with zeros?</p>

To generate the number call rand with the result of the expression "10 to the power of 10"
```
```
rand(10 ** 10)
```
```
To pad the number with zeros you can use the string format operator
```
```
'%010d' % rand(10 ** 10)
```
```
or the
```
rjust
```
method of string
```
```
rand(10 ** 10).to_s.rjust(10,'0')
```
```