Answer:
import os
def create_python_script(filename):
comments = "# new python script file"
with open(filename,"w+") as file:
file.write(comments)
filesize = os.path.getsize(filename)
print(f"The size of the file is: {filesize}")
create_python_script("program.py")
Explanation:
The os module is a built-in python file that is used to interact with the operating system terminal. The with keyword is used to create and open a file with write privileges with no need to close the file.
The path.getsize() method is used to get the size of the newly created file which is printed in the console.
Answer:
<u>BEST</u>
Option 4
<u>WORST</u>
2
Explanation:
Option 4 is the best cus confronting is better than just watching and letting it happen which in option 2 that's the case
The answer & explanation for this question is given in the attachment below.
Answer:
The formula and value to this question is "=A1+A3+A4+A5 with value 100"
Explanation:
The explanation of the given question as follows:
- In question, it is defined that four cells that are "A1, A2, A3, and A4" contains value that are "10, 20, 30, and 40".
- To add these values we use addition formula that is "=A1+A2+A3+A4". it will give value 100.
- If the user inserts a new row that is "A2" and assigns a value in the cell that is "50" so, we use the above formula that adds values with these values we also use the value "100".