Package deal
C859 Python Questions and Correct Answers | Latest Update
C859 Python Questions and Correct Answers | Latest Update
[Show more]C859 Python Questions and Correct Answers | Latest Update
[Show more]int() 
 -:- converts to integer object 
float() 
 -:- converts to float object 
str() 
 -:- converts to string object 
print() 
 -:- displays a message 
+ 
 -:- addition (integer) or concatenation (string) 
- 
 -:- subtraction 
** 
2 | P a g e | G r a d e A + | 2 0 2 4 / 2 0 2 5 
2 0 2 4 /2025 | © ...
Preview 2 out of 11 pages
Add to cartint() 
 -:- converts to integer object 
float() 
 -:- converts to float object 
str() 
 -:- converts to string object 
print() 
 -:- displays a message 
+ 
 -:- addition (integer) or concatenation (string) 
- 
 -:- subtraction 
** 
2 | P a g e | G r a d e A + | 2 0 2 4 / 2 0 2 5 
2 0 2 4 /2025 | © ...
var1, var2, var3 = 1, 2, 3 
 -:- multiple variable assignment 
12 
 -:- integer 
1.2 
 -:- float 
'twelve' 
 -:- string 
"twelve" 
 -:- string 
True or False 
 -:- Boolean value 
type() 
2 | P a g e | G r a d e A + | 2 0 2 4 / 2 0 2 5 
2 0 2 4 /2025 | © copyright | This work may not be copied f...
Preview 2 out of 12 pages
Add to cartvar1, var2, var3 = 1, 2, 3 
 -:- multiple variable assignment 
12 
 -:- integer 
1.2 
 -:- float 
'twelve' 
 -:- string 
"twelve" 
 -:- string 
True or False 
 -:- Boolean value 
type() 
2 | P a g e | G r a d e A + | 2 0 2 4 / 2 0 2 5 
2 0 2 4 /2025 | © copyright | This work may not be copied f...
f1 = open("/my_path/my_", "r") 
 -:- to open and read a file 
f1 = open("/my_path/my_", "w") 
 -:- to open and write a file (all previous material discarded) 
f1 = open("/my_path/my_", "a") 
 -:- to open and add to a file 
() 
 -:- read a file into a string 
("hello!") 
 -:- writes to ...
Preview 2 out of 9 pages
Add to cartf1 = open("/my_path/my_", "r") 
 -:- to open and read a file 
f1 = open("/my_path/my_", "w") 
 -:- to open and write a file (all previous material discarded) 
f1 = open("/my_path/my_", "a") 
 -:- to open and add to a file 
() 
 -:- read a file into a string 
("hello!") 
 -:- writes to ...
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Stuvia is a marketplace, so you are not buying this document from us, but from seller TestTrackers. Stuvia facilitates payment to the seller.
No, you only buy these notes for $18.80. You're not tied to anything after your purchase.
4.6 stars on Google & Trustpilot (+1000 reviews)
75323 documents were sold in the last 30 days
Founded in 2010, the go-to place to buy study notes for 14 years now