Computer Science, asked by Anonymous, 7 months ago

1. What are the writing modes of python?
2. Explain interactive modes in three lines.
3. Explain script mode in three lines.
4. Write the steps for writing a program in script mode?
5. Write the rules for writing a variable name.

Answers

Answered by harpreretharpreet
1

Answer:

Windows, bring up the command prompt and type "py", or start an interactive Python session by selecting "Python (command line)", "IDLE", or similar program from the task bar / app menu. IDLE is a GUI which includes both an interactive mode and options to edit and run files.

Explanation:

give me brainllest answer please please please please please

Answered by unmana53
3

Answer:

1)There are three kinds of mode, that Python provides and how files can be opened:

“ r “, for reading.

“ w “, for writing.

“ a “, for appending.

“ r+ “, for both reading and writing.

2)Interactive mode is a command line shell which gives immediate feedback for each statement, while running previously fed statements in active memory. As new lines are fed into the interpreter, the fed program is evaluated both in part and inIf instead you are working with more than a few lines of code, or you're ready to write an actual program, script mode is what you need.

3)If instead you are working with more than a few lines of code, or you're ready to write an actual program, script mode is what you need. Instead of having to run one line or block of code at a time, you can type up all your code in one text file, or script, and run all the code at once.

4)

  • File>New File (for creating a new script file) or Press ctrl+N.
  • Write the Python code as function i.e. script.
  • Save it (^S).
  • Execute it in interactive mode- by using RUN option (^F5).

5)Rules for naming variables:

  • All variable names must begin with a letter of the alphabet or an. underscore( _ ). ...
  • After the first initial letter, variable names can also contain letters and numbers. ...
  • Uppercase characters are distinct from lowercase characters. ...
  • You cannot use a C++ keyword (reserved word) as a variable name.
Similar questions