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
# this program Draws a board in screen | |
from operator import index | |
def ho_line(boardsize_ho, boardsize_vo): | |
print " --- " * boardsize_ho * (boardsize_vo +1) | |
def ve_lone(boardsize_ho, boardsize_vo): | |
print '| ' * (boardsize_ho + 1) * boardsize_vo | |
def main(): | |
boardsize_ho = int(raw_input('please enter the board horzintal size: ')) |
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
# hangman | |
# in this application i have a list of predifined words. each time user has to guess a word considering its length and shown like password. | |
# user has to choose letter by letter. cant have duplicate letter. we counte the steps. | |
import random | |
from pip._vendor.html5lib._ihatexml import letter | |
def get_word(): | |
words = ['choose','list','iran','behboudi','italia','instagram','facebook','war','likeit','motivation','crazy','dirty','love','hate','trump','who','mom','water','torta','kill','no','fardin'] | |
return random.choice(words).upper() |
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
#in this game computer choses a number between 1 and 100 randomly and you have to guess it | |
import random | |
def is_valid_num(s): | |
if s.isdigit() and 1 <= int(s) <= 100: | |
return True | |
else: | |
return False; |
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
# TextBaset Advanture Game | |
import random | |
print 'lets start the text based advanture game ' | |
def msg(room): | |
if room['msg'] == '': | |
return 'you have entered to : ' + room['name'] | |
else: | |
return room['msg'] |
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
# -*- coding: utf-8 -*- | |
import sys | |
import mailbox | |
import email | |
import quopri | |
import json | |
from bs4 import BeautifulSoup | |
MBOX = 'C:\Users\zzfbehb\Dropbox\Vodafone\Elastic\project files\MyFile.mbox' |