Computer Science, asked by queensp73, 8 months ago

Write a Python script that traverses through an input string and prints its characters in different lines- two characters per line.

Answers

Answered by Anonymous
5

HOPE IT'S HELPS..............

Attachments:
Answered by Yashicaruthvik
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