Create a gist now

Instantly share code, notes, and snippets.

@wkta /day_9.py
Last active Aug 29, 2015

What would you like to do?
#MonthOfCode day 9 - jump
import os
import random
from time import sleep
def disp_word_letter_up( word, ind_letter=-1 ):
chars = list(word)
os.system('clear')# replace by os.system('cls') on windows systems
#upper row
for i in xrange( len(chars)):
if(ind_letter == i ):
print chars[i],
else:
print ' ',
print ;
print ;
#lower row
for i in xrange( len(chars)):
if(ind_letter == i ):
print ' ',
else:
print chars[i],
print ;
print 'type a word or a phrase, please'
da_input = raw_input()
disp_word_letter_up( da_input )
for i in xrange( len(da_input)-1,-1,-1 ):
sleep(0.5)
disp_word_letter_up( da_input , i)
sleep(0.5)
disp_word_letter_up( da_input )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment