Import random. Create a program that creates a blank text file and writes a random number (in the form of a string) between 1 and 1000 on it. Next, close the file. Next, open the file again (this time read it) and read the text. Assign a variable to that data. Print the variable, then print the
int(variable) * 4.
Create a program that reads the attached text file (textfile.txt) and writes (appends) 2 newlines and then every 7th word followed by a space onto the text file.
Ex: if the text file contained “hi”, “ho”, “ha”, “hy”, “he”, “hu”, “we”, “everyone” it would write 2 newlines and then ‘hi everyone’