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
#!/usr/bin/python3 | |
hrs = input("Enter Hours:") | |
rate = input("Enter Rate:") | |
#Computing Overtime | |
if float(hrs) > 40: | |
hrs_difference = float(hrs) - 40 | |
#print(hrs_difference) | |
overtime_pay = float(hrs_difference *(rate * 1.5)) | |
print(overtime_pay) |
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
def comParsing(): | |
global comDist,n,nodeCoordinates | |
n = int(graph.split('\n')[0].split()) | |
for i in graph.split('\n')[1:]: | |
nodeCoordinates.append((int(i.split()[0]), int(i.split()[1]))) | |
for i,index in zip(nodeCoordinates,range(n)): | |
for j,index2 in zip(nodeCoordinates,range(n)): | |
comDist[index][index2]=math.sqrt((nodeCoordinates[j][0]-nodeCoordinates[i][0])**2+(nodeCoordinates[j][1]-nodeCoordinates[i][1])**2) #rasstoyanie ot i do vseh j | |
def commivoyager(): |