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