class Interval:
def __init__(self, hours=0, minutes=0, seconds=0):
self.hours = hours
self.minutes = minutes
self.seconds = seconds
self.total_seconds = 60*60*self.hours + 60*self.minutes + self.seconds
def __str__(self):
class Interval:
def __init__(self, hours=0, minutes=0, seconds=0):
self.hours = hours
self.minutes = minutes
self.seconds = seconds
self.total_seconds = 60*60*self.hours + 60*self.minutes + self.seconds
def __str__(self):
import random
class Apple:
def __init__(self, weight):
self.weight = weight
class Packaging:
apple_count = 0
total_weight = 0
class Triangle:
def __init__(self, vertice1, vertice2, vertice3):
self.__point1 = vertice1
self.__point2 = vertice2
self.__point3 = vertice3
def perimeter(self):
self.__leg1 = self.__point1.distance_from_point(self.__point2)
self.__leg2 = self.__point1.distance_from_point(self.__point3)
import math
class Point:
def __init__(self, x=0.0, y=0.0):
self.__x = x
self.__y = y
def getx(self):
return self.__x
class WeekDayError(Exception):
pass
class Weeker:
__weekdays = ['Mon','Tus','Wed', 'Thu','Fri','Sat', 'Sun']
def __init__(self,day):
try:
self.__stat = self.__weekdays.index(day)
class Timer:
def __init__(self, hour=0, minute=0, second=0):
self.__hour = hour
self.__minute = minute
self.__second = second
def __str__(self):
__second = self.__second
__minute = self.__minute
class StudentsDataException(BaseException):
pass
class BadLine(StudentsDataException):
def __str__ (self):
return "There is bad lines or wrong scores."
class FileEmpty(StudentsDataException):
def __str__ (self):
from os import strerror
srcname = input("Open a file: ")
dstname = input("Select a dst file: ")
try:
src = open(srcname, 'rt')
dst = open(dstname, 'wt')
except IOError as e:
print("Cannot open the file: ",strerror(e.errno))
from os import strerror
srcname = input("Open a file:")
try:
src = open(srcname, 'rt')
except IOError as e:
print("Cannot open the file: ",strerror(e.errno))
alpha = 'abcdefghijklmnopqrstuvwxyz'
dataDict ={}
NewerOlder