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.
B - because you should always be honest when it comes to working your hours and getting paid the right amount.
Answer: True
Explanation: Gen/Spec is the known as the general specification standard for the classes.This standard helps in bringing out the peer-to-peer relations of class.
Gen/Spec is used in class diagram because it helps in the display of the access sharing and class specification in the general form for the required instances.Thus, this standard helps in the enhancement of the class diagram and its inheritance. So, the statement given in the question is true.
Answer:
It would be considered cheating.
Explanation:
Any type of electronic use is considered cheating because you can look up the answers on the same phone or text someone for the answer. And so, Text messaging during a test is cheating because of the fact that is convenient to the cheater and not convenient to the teacher that is grading.