From 00ed00412c35380c7a581351f8021163125440d6 Mon Sep 17 00:00:00 2001 From: Grzegorz Rogozik Date: Sun, 12 Jan 2020 13:48:47 +0100 Subject: [PATCH] add pythons exercises --- intro/Task104.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/intro/Task104.py b/intro/Task104.py index 7ae4b42..876e71e 100644 --- a/intro/Task104.py +++ b/intro/Task104.py @@ -3,12 +3,10 @@ """Rozwiązanie zadania 104.""" -def sum_from_one_to_n(number): +def fahrenheit(number): """Placeholder""" - if number < 1: - return 0 - ret = 0 - for ile in range(1, number + 1): - ret += ile * ile - return ret + if number < -273.15: + return -459.67 + number = number-273.15 + return number