100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

C859 Python Review Exam Actual Questions And Well Elaborated Answers.

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
03-07-2024
Written in
2023/2024

f1 = open("/my_path/my_", "r") - correct answer to open and read a file f1 = open("/my_path/my_", "w") - correct answer to open and write a file (all previous material discarded) f1 = open("/my_path/my_", "a") - correct answer to open and add to a file () - correct answer read a file into a string ("hello!") - correct answer writes to a file ine() - correct answer reads next line () - correct answer closes a file (must always close a file!) with open("/my_file...etc) as f: - correct answer opens, allows work, and automatically closes a file timedelta - correct answer time library function to calculate time amounts from datetime import timedelta - correct answer grabs timedelta from the datetime library import datetime as dt - correct answer imports a library as a specified variable ().month - correct answer to print current month (aka .day or .year for those) beautiful soup - correct answer HTML parsing library NumPy - correct answer scientific computing, matrices, array creation library pandas - correct answer data manipulation and analysis library pillow (PIL) - correct answer work with and manipulate images; python imaging library pyglet - correct answer multimedia / gaming creation library pytz - correct answer time zone data library pip install ____________ import _______________ - correct answer to install and import a library into your code () - correct answer round down (4.5 = 4, 4.8 = 4, 4.1 = 4, 4.9 = 4) () - correct answer round up (4.6 = 5, 4.7 = 5, 4.1 = 5, 4.2 = 5) () - correct answer get today's date .(1967, 9, 7) print(ime("%A")) - correct answer gets the day of the week rial() - correct answer multiplies each number in argument to give answer () - correct answer return e raised to power of (x) (natural log) () - correct answer return square root of x () - correct answer create a hard link pointing to a source d() - correct answer returns string of current working directory t() - correct answer change the root directory of current process path e() - correct answer remove/delete the file path () - correct answer remove/delete a directory ange(start,stop, step) - any or all arguments - correct answer return a randomly selected element nt(a,b) - correct answer return a random integer greater than a, less than b m() - correct answer return next random floating point; range 0.0 to 1.0 e(seq) - correct answer seq = list; return a random element from the list import t - correct answer generates many kinds of plots quickly; works like MATLAB PIL.() - correct answer opens up an image PIL.() - correct answer creates new image PIL.() - correct answer displays image for debugging PIL.() - correct answer saves an image in a given filename ibe() - correct answer generates descriptive statistics, stats summary s() - correct answer dataframe; 2 dimensional labeled data structure slicing (with 9 elements, grabbing the first 3) - correct answer my_list[:3] upper bound is exclusive slicing(with 9 elements, grabbing the last 3) - correct answer my_list[6:] lower bound is inclusive slicing(with 9 elements, grabbing middle 3) - correct answer my_list[3:6] () - correct answer counts how many times that item appears e() - correct answer removes item in a list; example - (0) removes 1st element se() - correct answer reverses the items in a list () - correct answer removes last item in list (3) - correct answer removes 4th item in list (str or int) - correct answer finds that specific item in list and returns it's index () - correct answer removes a random element since set are not in any specific order tuple syntax - correct answer dimensions = 50, 40, 20 formating - correct answer print("The ages are {}, {}, and {}.".format(age1, age2, age3)) syntax to add element to a set - correct answer ("item") syntax to add element to the end of a list - correct answer d("item") syntax to add e

Show more Read less
Institution
WGU D335
Course
WGU D335









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D335
Course
WGU D335

Document information

Uploaded on
July 3, 2024
Number of pages
5
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
RealGrades Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
170
Member since
2 year
Number of followers
52
Documents
11655
Last sold
3 weeks ago

4.0

26 reviews

5
12
4
5
3
7
2
1
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions