in a bank there are two types odf transactions credit and debit all tranyare assigned an alphabetical id . credit transactions are assigned a vowel and debit transaction are assigned a consonant. to track transactions over a year all the transactions ids for each customer a customer wishes to know the number of times he made a debit transaction immediately after a credit transaction write an algorithm to print the count of debit transaction that were made immediately after a credit transaction forbthat particular customer
1
Expert's answer
2021-09-25T10:03:02-0400
s = input('Transaction IDs: ').lower()
vowel = ('a', 'e', 'i', 'o', 'u', 'y')
count = 0
for index, i in enumerate(s[1:]):
if i not in vowel and s[index] in vowel:
count += 1
print(count
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment