11 cs 6 BE A

8. Which argument of print( ) would you set for : (i) changing the default separator (space) ? (ii) printing the following line in current line ?

i) to change the default separator, argument sep will be changed. e.g. print(‘Aman’, ‘is’, ‘awesome’, sep=’@’) will print Aman@is@awesome ii) to print the following line in the current line, set argument end=” e.g. print(‘Aman is’, end=”) print(‘awesome’) will print Aman is awesome

8. Which argument of print( ) would you set for : (i) changing the default separator (space) ? (ii) printing the following line in current line ? Read More »

9. What are operators ? What is their function ? Give examples of some unary and binary operators.

Operators are tokens that trigger some computation when applied to variables and other objects in an expression. Unary operators require only one operand. e.g. -a, not b etc. Binary operators require two operands. e.g. a+b, a%b etc.

9. What are operators ? What is their function ? Give examples of some unary and binary operators. Read More »