A picture of DNA should be here

Данный скрипт написан на языке Python 2.7. Программа получает на вход файл monthdays.txt, который должен лежать в той же директории, что и скрипт. Файл monthdays.txt содержит соответствия названий месяцев и количеств дней в этих месяцах. Далее, после того как пользователь введет название месяца с клавиатуры, скрипт выводит количество дней во введенном месяце.

Скрипт:

# MSU FBB. Bioinformatics. Term 1. Block 2. Practice 10. Task 1.
# Days in a month v.0.1
# Returns the number of days in an inputted month
# Author: Buyanova S.M.
# Last modification date: 11:00 26.11.2013

dict_month=dict()
file_month = open ("monthdays.txt")
for line in file_month:
	line_list = line.split(None,1)
	dict_month[line_list[0].lower()] = line_list[1].strip(None)
file_month.close()

month = raw_input("Insert the name of the month: ", ).lower().strip(None)
if month in dict_month:
	print "There are",dict_month[month],"days in this month"
else:
	print "Error. Try again." 
                              
Скачать скрипт Просмотреть файл monthdays.txt