Write a python program to count no of ‘p’ in string “ pineapple”
Answers
Answered by
26
Write a python program to count no of ‘p’ in string “ pineapple”
•Program to count no of 'p' in the string pineapple.
•def lettercount( ):
•word = 'pineapple' count = 0 for letter in word:
if letter == 'p' count = cout + 1 print
•('Total no of 'p' in the string pineapple',count)
•Find the errors and output.
•Python Enter an input string A.
Similar questions
Math,
1 month ago
English,
1 month ago
Math,
1 month ago
History,
3 months ago
Hindi,
3 months ago
Social Sciences,
10 months ago
Business Studies,
10 months ago
Math,
10 months ago