Page 442 - Ai_417_V3.0_C9_Flipbook
P. 442

Ans.  Interactive mode and script mode.
                 13.  Define Python?
                Ans.  Python is a high-level, interpreted, interactive and object oriented-scripting language.

                 14.  Who developed Python?
                Ans.  Python was developed by Guido van Rossum in the late eighties and early nineties at the National Research Institute
                    for Mathematics and Computer Science in the Netherlands.
                 15.  Why Python is easy-to-learn?
                Ans.  Python has relatively few keywords, a simple structure, and a clearly defined syntax. This allows the student to pick up
                    the language in a relatively short period of time.
                 16.  Explain the disadvantages of Python.

                Ans.  Disadvantages of Python are:
                    a.  Python is an interpreted language and is slow compared to C/C++ or Java.
                    b.  Python is not the best for memory-intensive tasks.
                 17.  Can Python be easily integrated with C++?

                Ans.  Yes, Python can be easily integrated with C++.
                 18.  What is another name of comparison operators?
                Ans.  Relational operators.

                 19.  Which operator is used for assigning a value to a variable?
                Ans.  Assignment operators.
                 20.  Which operator is used for comparison of values?
                Ans.  Comparison operators.
                 21.  What is the use of the "+" operator?

                Ans.  The "+" operator adds values on either side of the operator.
                 22.  What is the use of the "*" operator?

                Ans.  The "**" operator multiplies values on either side of the operator.
                 23.  What is the use of "%" operator?
                Ans.  The "%" operator divides the left-hand operand by the right-hand operand and returns the remainder.
                 24.  What is the use of "**" operator?
                Ans.  The "*" operator performs exponential (power) calculation on operators.

                 25.  What is the use of the "==" operator?
                Ans.  It checks if the value of two operands is equal or not. It returns True if the values are equal, otherwise False.
                 26.  What is the use of the "!=" operator?

                Ans.  It checks if the value of two operands is equal or not, if values are not equal then condition becomes true.
                 27.  Why do you use the "<>" operator?
                Ans.  The "<>" operator historically was used in some programming languages, including older versions of Python, to denote
                    inequality. However, in Python, the preferred and standard operator for inequality is "!=" (not equal to).
                 28.  Describe the use of the ">" operator.
                Ans.  It checks if the value of the left operand is greater than the value of the right operand, if yes then condition becomes
                    true.



                    440     Touchpad Artificial Intelligence (Ver. 3.0)-IX
   437   438   439   440   441   442   443   444   445   446   447