robotframework-demo/Project/task4/Script/SC5_DR/Remainder.py

18 lines
457 B
Python

import paramiko
def calc_remainder(divisor,dividend):
try:
if int(divisor)%int(dividend)==0:
page=int(divisor)//int(dividend)
print(page)
return page
elif int(divisor)%int(dividend)>0:
page=int(divisor)//int(dividend)+1
print(page)
return page
except ZeroDivisionError:
print("error")
if __name__ == '__main__':
calc_remainder(divisor,dividend)