3) Which of the following are invalid strings in Python"
a)(Hello)
b)"Hello"
c) 'Hello
d)"Hello
e) 'Hello"
Answers
Answered by
5
Answer:
Hello
Explanation:
aapke ans.-a,c,d,e
Answered by
3
The invalid string format in python are options a, c, d, and e.
- The basic format for writing any string in python is to place letters, words, or sentences within an inverted comma (' ') or double inverted comma (" ").
- The syntax for printing strings in the console: print("Hello World.")
- The use of one single and one inverted comma together (" ' or ' ") is invalid.
- Use of either one single inverted comma or double inverted comma at the beginning or end of a string is also invalid.
- Thus option b is the only valid format, the rest are invalid.
#SPJ3
Similar questions
Computer Science,
3 months ago
Economy,
3 months ago
Physics,
3 months ago
Math,
6 months ago
Geography,
10 months ago