Q1. Write the output of the following:
- print("hello * 5")
- print("hello" * 5)
- print("***" * 5)
- print("Hello", "how", "R", "U")
- print("Hello" + "how" + "R" + "U")
- print("Amit" + "Sethi")
- print(23 + 9)
- print ("7 + 9")
- print(7/6)
- print(7//6)
- print(8 % 2)
- print(3 % 7)
- print(4 ** 3)
- print (7 * 5)
- print (8 - 16 )
Q2. What do you mean by string concatenation? Give example
Q3. What do you mean by binary and unary operators? Give one example of each.
Q4. Evaluate the following expressions
- 23 + 4 **2
- 9 * 3 - 8 + 6
- 7%2 + 7//2
- 67 + 3%3
- 12 % 4 + 6 + 4 // 3
Q5. Write the name and purpose of the following operators.
- //
- %
- **
- *
- -
- +
No comments:
Post a Comment