Skip to content

Instantly share code, notes, and snippets.

@dmfilipenko
Last active October 6, 2016 19:55
Show Gist options
  • Save dmfilipenko/06409c6d4eed10cdaab5f0cf2acea2f7 to your computer and use it in GitHub Desktop.
Save dmfilipenko/06409c6d4eed10cdaab5f0cf2acea2f7 to your computer and use it in GitHub Desktop.

Revisions

  1. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 20 additions and 1 deletion.
    21 changes: 20 additions & 1 deletion Завдання1.py
    Original file line number Diff line number Diff line change
    @@ -37,4 +37,23 @@
    5. «Hello, Harry!»
    """
    a = input()
    print('Hello, {0}!'.format(a))
    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)
  2. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion Завдання1.py
    Original 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)
    print(hours, minutes)

    """
    5. «Hello, Harry!»
    """
    a = input()
    print('Hello, {0}!'.format(a))
  3. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion Завдання1.py
    Original 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)
  4. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion Завдання1.py
    Original 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)
    print(k % n)

    """
    4. «Digital clock»
    """
  5. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion Завдання1.py
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,11 @@
    """
    b = int(input())
    h = int(input())
    print(b*h/2)
    print(b*h/2)
    """
    3. «Apple sharing»
    """
    n = int(input())
    k = int(input())
    print(k // n)
    print(k % n)
  6. Dmitriy Filipenko revised this gist Oct 6, 2016. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions Завдання1.py
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,14 @@
    """
    First task
    1. «Sum of three numbers»
    """
    a = int(input())
    b = int(input())
    c = int(input())
    print(a + b + c)
    print(a + b + c)

    """
    2. «Area of a right triangle»
    """
    b = int(input())
    h = int(input())
    print(b*h/2)
  7. Dmitriy Filipenko created this gist Oct 6, 2016.
    7 changes: 7 additions & 0 deletions Завдання1.py
    Original 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)