Created
May 11, 2018 03:27
-
-
Save Unitoi01/b76e4e4327a606ad1407c763d04b6a66 to your computer and use it in GitHub Desktop.
Python even array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myIntArray= [1,2,3,4,5,6,7,8] | |
ans=0 | |
#pound signs are to comment, also there are no arrays in Python, only lists! Which are better | |
for i in range(len(myIntArray)): | |
if(myIntArray[i]%2=0): | |
ans=ans+1 | |
print("there are"+ans+" "+"many even numbers") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment