Class XI : Chapter 1 Python Fundamental Test 6

 Q1. Write the output of the following:

  1. print("hello * 5")
  2. print("hello" * 5)
  3. print("***" * 5)
  4. print("Hello", "how", "R", "U")
  5. print("Hello" + "how" + "R" + "U")
  6. print("Amit" + "Sethi")
  7. print(23 + 9)
  8. print ("7 + 9")
  9. print(7/6)
  10. print(7//6)
  11. print(8 % 2)
  12. print(3 % 7)
  13. print(4 ** 3)
  14. print (7 * 5)
  15. 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
  1. 23 + 4 **2
  2. 9 * 3 - 8 + 6
  3. 7%2 + 7//2
  4. 67 + 3%3
  5. 12 % 4 + 6 + 4 // 3
Q5. Write the name and purpose of the following operators.
  1. //
  2. %
  3. **
  4. *
  5. -
  6. +

No comments:

Post a Comment

Most Recently Published

File Handling Test 6

 File Handling Test 6 Q1 . Do we need to use the close() function when we use 'with' statement to open a file? Q2. Which mode you wi...

CS - IP Assignment/Worksheet