Skip to content

Commit b7a6817

Browse files
author
Moises Vega
committedMay 18, 2011
Add First Puzzle
1 parent 2994f4c commit b7a6817

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
 

‎.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Python-Puzzles</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.python.pydev.PyDevBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.python.pydev.pythonNature</nature>
16+
</natures>
17+
</projectDescription>

‎.pydevproject

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?eclipse-pydev version="1.0"?>
3+
4+
<pydev_project>
5+
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
6+
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
7+
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
8+
<path>/Python-Puzzles/src</path>
9+
</pydev_pathproperty>
10+
</pydev_project>

‎src/FirstPuzzle.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'''
2+
Created on 17 May 2011
3+
4+
@author: Moises Vega
5+
'''
6+
7+
def HoppityHop( positiveInteger ):
8+
9+
for anIterator in range( 1 , positiveInteger + 1 ):
10+
if( anIterator % 3 == 0 and anIterator % 5 == 0 ):
11+
print( "Hop" )
12+
elif anIterator % 3 == 0:
13+
print( "Hoppity" )
14+
elif anIterator % 5 == 0:
15+
print( "Hophop" )
16+
17+
18+
19+
HoppityHop( 15 )

0 commit comments

Comments
 (0)
Please sign in to comment.