From 22fff8911c069e30d29ccc13bcfd2856c0619859 Mon Sep 17 00:00:00 2001 From: clearsense Date: Sat, 14 May 2016 17:00:29 +0300 Subject: [PATCH] fix num_of_ifs calculation num_of_ifs should be calc like this, because numeration start from 0 --- generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator.py b/generator.py index 0a7545a..81c6471 100644 --- a/generator.py +++ b/generator.py @@ -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