CMSC 135 Python Final(Correctly solved)
Types of applications correct answers Console application, GUI application, web application Syntax error correct answers An error from python not being able to understand something, usually a typo Runtime error correct answers An error that happens while a program is running Logic error correct answers Nothing is directly "wrong", the code runs, but the result is wrong Exception correct answers An error or other message raised by the interpreter or compiler to indicate a special circumstance that should be handled by an exception handler. If an exception is not handled, the program will stop and report the error. Statement correct answers A statement performs a task Function correct answers Reusable code that performs a task function_name() The three data types correct answers String, integer,float Arithmetic operators correct answers +, -, *, / % = Modulo/Remainder ** = Exponent // = Exponentiation The three compound assignment operators correct answers += adds the result to the variable -= subtracts the result from the variable *= Multiplies the variable by the result Escape sequences correct answers n = new line t = one tab r = return = backslash How to round correct answers round(number, digits) For example: x = 27.235902 round(x, 2) Shebang line correct answers Usually the first line in a script that shows where the path is to the interpreter binary library
Written for
- Institution
- CMSC 132
- Course
- CMSC 132
Document information
- Uploaded on
- May 29, 2024
- Number of pages
- 4
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal