Computer Science, asked by jaideepsaxena892, 4 months ago

SHORT ANSWER TYPE QUESTIONS (Do by yourself)
1. Write any two features of Python that makes it easy to use.
2. Differentiate between Interactive and Script mode of Python.
3. What are the various membership operators in Python?
4. What do you mean by Iterative Statements in Python?
5. Write the Python Program to print the Table of a number.
6. What is File Transfer Protocol (FTP)?
Write the name of various types of Networks.
8. Write any two advantages of Networking.
9. Differentiate between Hybrid App and Native App.
10. Write the name of some websites which provide free service to develop Android Apps.​

Attachments:

Answers

Answered by prathanakumari131
3

1. python is a high level programming language.

Answered by madmanmaharana80
1

Explanation:

In Python, there are two options/methods for running code:

Interactive mode

Script mode

In this article, we will see the difference between the modes and will also discuss the pros and cons of running scripts in both of these modes.

Interactive Mode

Interactive mode, also known as the REPL provides us with a quick way of running blocks or a single line of Python code. The code executes via the Python shell, which comes with Python installation. Interactive mode is handy when you just want to execute basic Python commands or you are new to Python programming and just want to get your hands dirty with this beautiful language.

To access the Python shell, open the terminal of your operating system and then type "python". Press the enter key and the Python shell will appear. This is the same Python executable you use to execute scripts, which comes installed by default on Mac and Unix-based operating systems.

C:\Windows\system32>python

Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>>

The >>> indicates that the Python shell is ready to execute and send your commands to the Python interpreter. The result is immediately displayed on the Python shell as soon as the Python interpreter interprets the command.

To run your Python statements, just type them and hit the enter key. You will get the results immediately, unlike in script mode. For example, to print the text "Hello World", we can type the following:

>>> print("Hello World")

Hello World

>>>

Here are other examples:

>>> 10

10

>>> print(5 * 20)

100

>>> "hi" * 5

'hihihihihi'

>>>

We can also run multiple statements on the Python shell. A good example of this is when we need to declare many variables and access them later. This is demonstrated below:

>>> name = "Nicholas"

>>> age = 26

>>> course = "Computer Science"

>>> print("My name is " + name + ", aged " + str(age) + ", taking " + course)

Output

My name is Nicholas, aged 26, taking Computer Science

Using the method demonstrated above, you can run multiple Python statements without having to create and save a script. You can also copy your code from another source then paste it on the Python shell.

Consider the following example:

>>> if 5 > 10:

... print("5 is greater than 10")

... else:

... print("5 is less than 10")

...

5 is less than 10

>>>The above example also demonstrates how we can run multiple Python statements in interactive mode. The two print statements have been indented using four spaces. Just like in script mode, if you don't indent properly you will get an error. Also, to get the output after the last print statement, you should press the enter key twice without typing anything.

You can also get help with regards to a particular command in interactive mode. Just type the help() command on the shell and then hit the enter key. You will see the following:

>

Similar questions