ch- 6 INTRODUCING PYTHON
PG. NO. - 87
CLASS 7
PLS SOLVE THIS I WILL MAKE U BRAINLIST
Answers
1. print(\t)
2. Interactive mode
Please frame the answers on your own, this is just the main answer...
Question:
1. Kritika's computer teacher has given her an assignment to display the names of the fruits separated by tab space in python. Which separator should she use with the print() function?
2. Aman is working on hi mathematics project work. He has to perform some quick calculations. Which mode of python programming should he use for doing calculations?
Answer:
1. \t
2. interactive
Explanation:
1. They are called escape characters in python. They allow special functions to be performed even when used between the string.
print("Apples\toranges" )
will return Apples Oranges
2. There are two modes in python
- Interactive: perfect for testing and running small programs quickly without saving.
- Scripting : For long programs.
Additional:
Some other escape characters:
1. \n adds new line.
2. \'' allows double quotes to be printed.
3. \\ adds backslash.