Python Basic Quiz #1 – About Python

Previous Next User Input: Input(message) function waits for an input from user. Input function always takes in a string data type value from the user. Output: Enter: 5 <class ‘str’> <class ‘int’> Format Output: There may be situations, where we…
Previous Next Python provides various types of operators. Mathematical Operators: Mathematical operators are used to perform mathematical operations like addition, subtraction, multiplication, division. In addition to that the modulus, Floor division, Exponential operators also available. Conditional Operators: Conditional operators are…
Variable names, function names, class-method names: Use lower case words separated by underscore. Class Name: Each word starts with Capital letter. No Underscore. (Camel Case) Constant: Full Upper-case words separated by underscore. Some common best practices: Most of the time,…
Each variable must be categorized into a type of value. Based on the type, the variable will be used for the mathematical or logical operations. For example, we can use mathematical operations such as addition, multiplication can only be applied…
Spaces and Colons: As we already seen in Python Introduction that Python is basically invented for simplicity and easy of understanding. A well formatted code is easy to understand. Even though we all know this, some may not consider this…