def myfun(num): count = 0 for x in num: if x == 4: count = count + 1 return count if __name__=="__main__": print(myfun([1, 4, 6, 7, 4])) print(myfun([1, 4, 6, 4, 7, 4]))
2 3
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Write a python program to adding a thousand separator
Write a python program to checking if a string is empty or not ?
Write a Python program to check whether a character is an alphabet or not
Write a Python program that accepts an integer (n) and computes the value of n+nn+nnn.
Write a Python program to get the volume of a sphere with radius six.