Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = input()
- def zadacha__ABab(a) :
- text = ""
- count = 0
- for i in range(len(a)):
- if a[i]== "a" :
- text = text + "b"
- count += 1
- elif a[i] == "A":
- text = text + "B"
- count += 1
- elif a[i] == "b":
- text = text + "a"
- count += 1
- elif a[i]=="B":
- text = text + "A"
- count += 1
- elif a[i] == "c":
- text = text + "с"
- elif a[i] == "C":
- text = text + "C"
- else:
- pass
- #text - преобразованный текст
- #count - количество замен
- print(text)
- print(count)
- zadacha__ABab(a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement