Advertisement
Rementai

Szukanie A Pyton

Mar 2nd, 2023
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. sentence = input("Please enter some text: ")
  2. sentence = str(sentence)
  3. counter = 0
  4.  
  5. for i in sentence:
  6.     if i == "a" or i == "A":
  7.         counter += 1
  8.  
  9. print("Amount of A's in entered sentence: " +str(counter))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement