Skip to content

Instantly share code, notes, and snippets.

View arudova's full-sized avatar

Adelina Rudova arudova

  • VMware
  • Sofia, Bulgaria
View GitHub Profile
import unittest
PARASITE_WORDS = ("wow", "lol", "so", "such", "much", "very")
def wow_such_much(start, end):
return list(map(change_number, range(start, end)))
def change_number(number):
if number % 15 == 0:
return "suchmuch"
import unittest
from solution import wow_such_much, count_doge_words
class TestDoge(unittest.TestCase):
def test_suchmuch_from_negative(self):
self.assertEqual(wow_such_much(-5, 7),
['much', '-4', 'such', '-2', '-1', 'suchmuch', '1', '2', 'such', '4', 'much', 'such'])
;Първа задача
(define (in-figure x y)
(cond ((and (and (>= x 1) (<= x 2)) (and (>= y -1) (<= y 0.5))) #t)
((and (and (>= x 0) (<= x 1)) (and (>= y -1) (<= y 1))) #t)
((and (>= (expt (+ (expt (+ x 1) 2) (expt y 2)) 0.5) 1)
(and (>= x -1) (<= x 0))
(and (>= y -1) (<= y 1))) #t)
(else #f)))
;(in-figure 0 0)