fix num_of_ifs calculation

num_of_ifs should be calc like this, because numeration start from 0
This commit is contained in:
clearsense 2016-05-14 17:00:29 +03:00
parent 1d300c065e
commit 22fff8911c

View File

@ -9,7 +9,7 @@ min_num = 0
max_num = 50
nums = range(min_num, max_num+1)
signs = ['+', '-', '/', '*']
num_of_ifs = len(signs)*(max_num-min_num)**2
num_of_ifs = len(signs)*(max_num-min_num+1)**2
print("""# my_first_calculator.py by AceLewis
# TODO: Make it work for all floating point numbers too