1. Please use random function to generate 20 That's ok , Each row 10 A digital , The number range is 1-100 Between random integers stored in the file random.txt in , Programming to find the mode of these integers and output , Mode is the number that appears most in a group .
2.《 A dream of red mansions 》 It is one of the four famous works , Save its text in hongloumeng.txt In file , Write a program to count the number of characters in each character of this article ( Line breaks and spaces are not counted ), Characters and occurrences are separated by colons , Save the results in a file PY7_1.txt in , And sort the number of characters obtained , Rank top 10 The common characters of are saved in PY_2.txt in .