From b96439cce14af247bd7fb515161f20931c97c423 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 12:36:33 +0530 Subject: [PATCH 01/14] Fixed the first challenge --- 01_challenge/01_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_challenge/01_challenge.py b/01_challenge/01_challenge.py index 2d40fa5..f856397 100644 --- a/01_challenge/01_challenge.py +++ b/01_challenge/01_challenge.py @@ -24,7 +24,7 @@ def fizzbuzz(max_num): # % or modulo division gives you the remainder if i%num1==0 and i%num2==0: print(i,three_mul+five_mul) - elif i%num1=0: + elif i%num1==0: print(i,three_mul) elif i%num2==0: print(i,five_mul) From b11cc3bbab4a7aca51d67b989b5e8a1ce8f0e4f9 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 12:37:10 +0530 Subject: [PATCH 02/14] Fixed the first challenge --- 02_challenge/02_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02_challenge/02_challenge.py b/02_challenge/02_challenge.py index b41cd50..7513999 100644 --- a/02_challenge/02_challenge.py +++ b/02_challenge/02_challenge.py @@ -23,4 +23,4 @@ def fizzbuzz(max_num): #----START OF SCRIPT if __name__=='__main__': - fizzbuzz() + fizzbuzz(100) From 6df08abb359d3eb127be70c87ae3b0aa739b337a Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 12:53:59 +0530 Subject: [PATCH 03/14] fixed third challenge --- 03_challenge/03_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03_challenge/03_challenge.py b/03_challenge/03_challenge.py index 6e67d1f..2e4cd35 100644 --- a/03_challenge/03_challenge.py +++ b/03_challenge/03_challenge.py @@ -23,4 +23,4 @@ def fizzbuzz(max_num): #----START OF SCRIPT if __name__=='__main__': - fizzbuzz('16') + fizzbuzz(16) From 12454b9f0ce37951c9401a88bb8b8502fb802de4 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 12:57:57 +0530 Subject: [PATCH 04/14] fixed fourth challenge --- 04_challenge/04_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04_challenge/04_challenge.py b/04_challenge/04_challenge.py index a3f5edf..ff24e6c 100644 --- a/04_challenge/04_challenge.py +++ b/04_challenge/04_challenge.py @@ -23,7 +23,7 @@ def fizzbuzz(max_num): for i in range(1,max_num): # % or modulo division gives you the remainder if i%num1==0 and i%num2==0: - print(i,three_mul+five_mul) + print(i,three_mul+five_mul) elif i%num1==0: print(i,three_mul) elif i%num2==0: From ba27c516fd7cb3fb6e910898b9360684a10f3a41 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 13:39:07 +0530 Subject: [PATCH 05/14] fixed fourth challenge --- 06_challenge/06_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_challenge/06_challenge.py b/06_challenge/06_challenge.py index b09e24e..d8d4483 100644 --- a/06_challenge/06_challenge.py +++ b/06_challenge/06_challenge.py @@ -18,7 +18,7 @@ def fizzbuzz(max_num): three_mul = 'fizz' five_mul = 'buzz' num1 = conf.num1 - num2 = conf.num + num2 = conf.num2 # Google for 'range in python' to see what it does for i in range(1,max_num): # % or modulo division gives you the remainder From cc6460cb808acb45d2c597bf2c0d650a51be0406 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 14:19:57 +0530 Subject: [PATCH 06/14] challenge 10 solved --- 10_challenge/10_challenge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/10_challenge/10_challenge.py b/10_challenge/10_challenge.py index 7d1edf8..102d720 100644 --- a/10_challenge/10_challenge.py +++ b/10_challenge/10_challenge.py @@ -8,8 +8,8 @@ # print buzz for multiples of 5 # print fizzbuzz for multiples of 3 and 5" """ -import fizzbuzz +import fizzbuzz as fb #----START OF SCRIPT if __name__=='__main__': - fizzbuzz(100) \ No newline at end of file + fb.fizzbuzz(100) \ No newline at end of file From 6f163a9db3a81d08e196e51881c347bc8e925389 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 14:29:23 +0530 Subject: [PATCH 07/14] challenge 11 solved --- 11_challenge/11_challenge.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/11_challenge/11_challenge.py b/11_challenge/11_challenge.py index 123d406..2c07c45 100644 --- a/11_challenge/11_challenge.py +++ b/11_challenge/11_challenge.py @@ -14,12 +14,14 @@ def fizzbuzz(max_num): # Google for 'range in python' to see what it does for i in range(1,max_num): # % or modulo division gives you the remainder - if i%3==0: + if i%3==0 and i%5==0: + print(i,"fizzbuzz") + elif i%3==0: print(i,"fizz") elif i%5==0: print(i,"Buzz") - elif i%3==0 and i%5==0: - print(i,"fizzbuzz") + #elif i%3==0 and i%5==0: + # print(i,"fizzbuzz") #----START OF SCRIPT if __name__=='__main__': From ff693f69df25c5927587f845575450f41f377c7f Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 14:35:31 +0530 Subject: [PATCH 08/14] challenge 11 solved --- 12_challenge/12_challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/12_challenge/12_challenge.py b/12_challenge/12_challenge.py index d8088be..1dc63d5 100644 --- a/12_challenge/12_challenge.py +++ b/12_challenge/12_challenge.py @@ -15,7 +15,7 @@ def __init__(self): # adding some redundant declarations on purpose # we will make our script 'tighter' in one of coming exercises self.num1 = 3 - self.num2 = 4 + self.num2 = 5 self.three_mul = 'fizz' self.five_mul = 'buzz' From dba850ff19f4e53cf647909824afdd6073bced5e Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 14:38:07 +0530 Subject: [PATCH 09/14] challenge 13 solved --- 13_challenge/13_challenge.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/13_challenge/13_challenge.py b/13_challenge/13_challenge.py index e7828f6..f856397 100644 --- a/13_challenge/13_challenge.py +++ b/13_challenge/13_challenge.py @@ -14,13 +14,13 @@ def fizzbuzz(max_num): # adding some redundant declarations on purpose # we will make our script 'tighter' in one of coming exercises - three_mul = 'fizz + three_mul = 'fizz' five_mul = 'buzz' num1 = 3 num2 = 5 # Google for 'range in python' to see what it does - for i in range(1,max_num) + for i in range(1,max_num): # % or modulo division gives you the remainder if i%num1==0 and i%num2==0: print(i,three_mul+five_mul) @@ -31,4 +31,4 @@ def fizzbuzz(max_num): #----START OF SCRIPT if __name__=='__main__': - fizzbuzzy(100) + fizzbuzz(100) From 78ef0fb630d1f67b62c53284023f091445601ef4 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 15:11:56 +0530 Subject: [PATCH 10/14] challenge 8 solved --- 08_challenge/08_challenge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/08_challenge/08_challenge.py b/08_challenge/08_challenge.py index a7147d2..af18249 100644 --- a/08_challenge/08_challenge.py +++ b/08_challenge/08_challenge.py @@ -11,8 +11,8 @@ class Fizz_Buzz: "Class to implement FizzBuzz for multiples of 3 and 5" - - def fizzbuzz(max_num): + + def fizzbuzz(self,max_num): "This method implements FizzBuzz" # adding some redundant declarations on purpose From 818adcea9a47f80b977a94ffcf32a7a5fb1bdc34 Mon Sep 17 00:00:00 2001 From: lenish Date: Mon, 3 Feb 2020 15:14:27 +0530 Subject: [PATCH 11/14] challenge 5 solved --- 05_challenge/05_challenge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/05_challenge/05_challenge.py b/05_challenge/05_challenge.py index 0f9bdbd..2230348 100644 --- a/05_challenge/05_challenge.py +++ b/05_challenge/05_challenge.py @@ -17,11 +17,11 @@ def fizzbuzz(max_num): # we will make our script 'tighter' in one of coming exercises three_mul = 'fizz' five_mul = 'buzz' - with open('mifile.txt','r') as f: - print 'i have created' - num1 = int(f.readline()) + with open('myfile.txt','r') as f: + print('i have created') + num1 =int(f.readline()) num2=int(f.readline()) - max_num = int(f.readline()) + max_num =int(f.readline()) # Google for 'range in python' to see what it does for i in range(1,max_num): From e0bbb3f9e0ac9214113970bca4fe613517d04a78 Mon Sep 17 00:00:00 2001 From: Annapoorani Bala Date: Tue, 4 Feb 2020 10:32:34 +0530 Subject: [PATCH 12/14] Added some lines in the challenge 01 --- 01_challenge/01_challenge.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/01_challenge/01_challenge.py b/01_challenge/01_challenge.py index f856397..eaee819 100644 --- a/01_challenge/01_challenge.py +++ b/01_challenge/01_challenge.py @@ -14,14 +14,15 @@ def fizzbuzz(max_num): # adding some redundant declarations on purpose # we will make our script 'tighter' in one of coming exercises - three_mul = 'fizz' - five_mul = 'buzz' + three_mul = 'qxf2' + five_mul = 'services' num1 = 3 num2 = 5 # Google for 'range in python' to see what it does - for i in range(1,max_num): - # % or modulo division gives you the remainder + for i in range(1,max_num+1): + # % or modulo division gives you the remainder + print(max_num,i) if i%num1==0 and i%num2==0: print(i,three_mul+five_mul) elif i%num1==0: From 3dff36f9ce02222189b58a151fd00a5fbabf6b57 Mon Sep 17 00:00:00 2001 From: lenish Date: Tue, 4 Feb 2020 10:40:24 +0530 Subject: [PATCH 13/14] challenge 1 gcem --- 01_challenge/01_challenge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/01_challenge/01_challenge.py b/01_challenge/01_challenge.py index eaee819..e936636 100644 --- a/01_challenge/01_challenge.py +++ b/01_challenge/01_challenge.py @@ -14,8 +14,8 @@ def fizzbuzz(max_num): # adding some redundant declarations on purpose # we will make our script 'tighter' in one of coming exercises - three_mul = 'qxf2' - five_mul = 'services' + three_mul = 'GCEM' + five_mul = 'CSE DEPT' num1 = 3 num2 = 5 From 2e8d8b08d20454ca49a48a991fa2275154aef541 Mon Sep 17 00:00:00 2001 From: Annapoorani Bala Date: Tue, 4 Feb 2020 10:43:40 +0530 Subject: [PATCH 14/14] changed some lines in the challenge 01 --- 01_challenge/01_challenge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/01_challenge/01_challenge.py b/01_challenge/01_challenge.py index eaee819..8b089bd 100644 --- a/01_challenge/01_challenge.py +++ b/01_challenge/01_challenge.py @@ -14,8 +14,8 @@ def fizzbuzz(max_num): # adding some redundant declarations on purpose # we will make our script 'tighter' in one of coming exercises - three_mul = 'qxf2' - five_mul = 'services' + three_mul = 'qxf212' + five_mul = 'services21212121' num1 = 3 num2 = 5 @@ -23,6 +23,8 @@ def fizzbuzz(max_num): for i in range(1,max_num+1): # % or modulo division gives you the remainder print(max_num,i) + if (i>0): + print("I am inside i") if i%num1==0 and i%num2==0: print(i,three_mul+five_mul) elif i%num1==0: