Write program named program52py that uses main and a void


Write program named program52.py that uses main and a void function named randnums that takes no arguments and does not return anything. The randnums function generates 6 random integers, each greater than 0 and less than 10, and prints them all on one line separated by spaces (duplicates are okay). Finally, randnums prints the total of the 6 integers on a new line. The main function should call the randnums function.

SAMPLE OUTPUT

2 4 8 9 9 3

The total is 35

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write program named program52py that uses main and a void
Reference No:- TGS02511718

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)