C859 Python (A+ Graded)
f1 = open("/my_path/my_", "r") correct answers to open and read a file f1 = open("/my_path/my_", "w") correct answers to open and write a file (all previous material discarded) f1 = open("/my_path/my_", "a") correct answers to open and add to a file () correct answers read a file into a string ("hello!") correct answers writes to a file ine() correct answers reads next line () correct answers closes a file (must always close a file!) with open("/my_file...etc) as f: correct answers opens, allows work, and automatically closes a file timedelta correct answers time library function to calculate time amounts from datetime import timedelta correct answers grabs timedelta from the datetime library import datetime as dt correct answers imports a library as a specified variable ().month correct answers to print current month (aka .day or .year for those) beautiful soup correct answers HTML parsing library NumPy correct answers scientific computing, matrices, array creation library pandas correct answers data manipulation and analysis library pillow (PIL) correct answers work with and manipulate images; python imaging library pyglet correct answers multimedia / gaming creation library pytz correct answers time zone data library pip install ____________ import _______________ correct answers to install and import a library into your code () correct answers round down (4.5 = 4, 4.8 = 4, 4.1 = 4, 4.9 = 4) () correct answers round up (4.6 = 5, 4.7 = 5, 4.1 = 5, 4.2 = 5)
Document information
- Uploaded on
- July 13, 2023
- Number of pages
- 3
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers