2.
How do you open a file in Ruby in write mode, creating it if it does not exist?

4.
What is the purpose of the File.readlines() method in Ruby?

7.
What does the 'a+' file mode in Ruby signify?

10.
What does the 'r+' file mode in Ruby signify?