Write a Python script that traverses through an input string and prints its characters in different lines- two characters per line.
Answers
Answered by
5
HOPE IT'S HELPS..............
Attachments:
Answered by
2
Answer:
inputString = input("Please type your string: ")
i = 0
while i < len(inputString):
print(inputString[i] + inputString[i + 1])
if((i + 3) == len(inputString)):
print(inputString[i + 2])
break
i = i + 2
Depending on the console running the program, you may need to add "\n" to the beginning of the print statements so that the read print("\n" + inputString[i] + inputString[i + 1]) and print("\n" + inputString[i + 2])
Explanation:
can you please mark me as brainliest and inbox me
Similar questions
Science,
4 months ago
Social Sciences,
4 months ago
Hindi,
4 months ago
Business Studies,
8 months ago
English,
8 months ago
English,
11 months ago