C859 Python Syntax (with Error-free Solutions)
var1, var2, var3 = 1, 2, 3 correct answers multiple variable assignment 12 correct answers integer 1.2 correct answers float 'twelve' correct answers string "twelve" correct answers string True or False correct answers Boolean value type() correct answers determines type of an object (integer, boolean, etc) int() correct answers converts to integer object float() correct answers converts to float object str() correct answers converts to string object print() correct answers displays a message + correct answers addition (integer) or concatenation (string) - correct answers subtraction ** correct answers power of % correct answers modulus, remainder / correct answers division, always results in float // correct answers division, always results in integer = correct answers assignment operator += correct answers reassignment operator, adds -= correct answers reassignment operator, subtracts *= correct answers reassignment operator, multiples /= correct answers reassignment operator, divides
Document information
- Uploaded on
- July 13, 2023
- Number of pages
- 4
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers