Right Answer:
The primary goal of Python 1.0 was to create a language designed for readability, simplicity, and ease of use, aiming to balance between low-level languages (like C) and shell scripting.
Right Answer:
The primary goal of Python 1.0 was to create a language designed for readability, simplicity, and ease of use, aiming to balance between low-level languages (like C) and shell scripting.
Right Answer:
True, False and None are capitalized while the others are in lower case.
Right Answer:
To write single-line comments in Python use the Hash character (#) at the beginning of the line. It is also called number sign or pound sign. To write multi-line comments, close the text between triple quotes.
Example: “”” comment
text “””
Right Answer:
Subsequent versions of Python 3 have refined the language by embracing modern programming paradigms, expanding the standard library, enhancing performance, and adapting to user needs and global tech trends.
Right Answer:
Python 2.0 was released in 2000. Its main improvements included making programming smoother and more efficient, significantly expanding the language's toolkit to achieve a wider range of tasks out of the box.
Right Answer:
The order of precedence is: %, +. Hence the expression above, on simplification results in 4 + 3 = 7. Hence the result is 7.
Right Answer:
‘.py’ is the correct extension of the Python file. Python programs can be written in any text editor. To save these programs we need to save in files with file extension ‘.py’.
Right Answer:
The def keyword is used to create, (or define) a function in python.
Right Answer:
The function sys.version can help us to find the version of python that we are currently working on. It also contains information on the build number and compiler used. For example, 3.5.2, 2.7.3 etc. this function also returns the current date, time, bits etc along with the version.
Right Answer:
Python supports the creation of anonymous functions (i.e. functions that are not bound to a name) at runtime, using a construct called lambda. Lambda functions are restricted to a single expression. They can be used wherever normal functions can be used.