• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

CMPSC 132 midterm(Complete solutions)

Document preview thumbnail
Preview 2 out of 11 pages

Shell mode correct answers A style of using Python where we type expressions at the command prompt, and the results are shown immediately. Contrast with source code, and see the entry under Python shell. Program mode correct answers write an entire program by placing lines of Python instructions in a file and then use the interpreter to execute the contents of the file as a whole interpreters correct answers source code---interpreter---output compilers correct answers source code--compilers--object code--executor--output Blocks of code are denoted by line indentation, which is ______enforced. correct answers rigidly A Python identifier correct answers name used to identify a variable, function, class, module or other object. mutable objects correct answers they can be altered in place i.e(int, float) immuttable objects correct answers cannot be changed in place i.e(list, dict) Aliases correct answers Multiple variables that contain references to the same object. Slicing correct answers Selecting a portion of a collection [:end] correct answers gets the first characters up to but not including end [begin:end] correct answers gets the characters from begin up to but not including end [begin:] correct answers gets the characters from beginning to the end of the string (substr) correct answers returns the index of the first occurence of substring str ce(old, new) correct answers returns a copy of str with all occurrences of old replaced with new (delimiter) correct answers returns a list of substrings from str delimited by delimiter (iterable) correct answers returns a string that is the concatenation of all the elements of iterable with string between each element () correct answers returns a copy of str with leading and trailing whitespace removed


Document information

Uploaded on
May 29, 2024
Number of pages
11
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$12.19

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
Sold
23
Followers
6
Items
4026
Last sold
1 month ago




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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

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