πŸ“Š Problem Solving and Python Programming
Q. To concatenate two strings to a third what statements are applicable?
  • (A) s3 = s1 . s2
  • (B) s3 = s1.add(s2)
  • (C) s3 = s1. add (s2)
  • (D) s3 = s1 * s2
πŸ’¬ Discuss
βœ… Correct Answer: (C) s3 = s1. add (s2)

Explanation: add is another method that can be used for concatenation.

πŸ“Š Problem Solving and Python Programming
Q. Which of the following statement prints hello\example\test.txt?
  • (A) print(“hello\\example\\test.txt”)
  • (B) print(“hello\\example\\test.txt”)
  • (C) print(“hello\\”example\\”test.txt”)
  • (D) print(“hello”\\example”\\test.txt”)
πŸ’¬ Discuss
βœ… Correct Answer: (B) print(“hello\\example\\test.txt”)

Explanation: \is used to indicate that the next

Jump to