Last active
October 6, 2016 19:55
-
-
Save dmfilipenko/06409c6d4eed10cdaab5f0cf2acea2f7 to your computer and use it in GitHub Desktop.
Revisions
-
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 20 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -37,4 +37,23 @@ 5. «Hello, Harry!» """ a = input() print('Hello, {0}!'.format(a)) """ 6. «Previous and next» """ a = int(input()) print('The next number for the number {0} is {1}.'.format(a, a + 1)) print('The previous number for the number {0} is {1}.'.format(a, a - 1)) """ 7. «School desks» """ group_1 = int(input()) group_2 = int(input()) group_3 = int(input()) res = group_1 // 2 + group_1 % 2 + \ group_2 // 2 + group_2 % 2 + \ group_3 // 2 + group_3 % 2 print(res) -
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,4 +31,10 @@ if hours > 24: print(hours - (hours // 24) * 24, minutes) else: print(hours, minutes) """ 5. «Hello, Harry!» """ a = input() print('Hello, {0}!'.format(a)) -
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,12 @@ """ 4. «Digital clock» """ n = int(input()) hours_raw = n // 60 hours = 0 if hours_raw == 24 else hours_raw minutes = n % 60 if hours > 24: print(hours - (hours // 24) * 24, minutes) else: print(hours, minutes) -
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,10 +12,15 @@ b = int(input()) h = int(input()) print(b*h/2) """ 3. «Apple sharing» """ n = int(input()) k = int(input()) print(k // n) print(k % n) """ 4. «Digital clock» """ -
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,4 +11,11 @@ """ b = int(input()) h = int(input()) print(b*h/2) """ 3. «Apple sharing» """ n = int(input()) k = int(input()) print(k // n) print(k % n) -
Dmitriy Filipenko revised this gist
Oct 6, 2016 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,14 @@ """ 1. «Sum of three numbers» """ a = int(input()) b = int(input()) c = int(input()) print(a + b + c) """ 2. «Area of a right triangle» """ b = int(input()) h = int(input()) print(b*h/2) -
Dmitriy Filipenko created this gist
Oct 6, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ """ First task """ a = int(input()) b = int(input()) c = int(input()) print(a + b + c)