Autopistes de peatge ==================== >>> from autopistes import trams >>> round(trams(4, 14, 2.5, 50), 2) # doctesttag: +TAG=1_autopistes-1_trams 25.0 >>> round(trams(4, 9, 3.1, 50), 2) # doctesttag: +TAG=1_autopistes-1_trams 15.5 >>> round(trams(1, 7, 3, 50), 2) # doctesttag: +TAG=1_autopistes-1_trams 18.0 >>> round(trams(5, 2, 2.5, 50), 2) # doctesttag: +TAG=1_autopistes-1_trams 7.5 >>> round(trams(7, 9, 4, 50), 2) # doctesttag: +TAG=1_autopistes-1_trams 8.0 >>> round(trams(3, 18, 3, 40), 2) # doctesttag: +TAG=1_autopistes-1_trams 40.0 >>> round(trams(3, 18, 3.5, 35.5), 2) # doctesttag: +TAG=1_autopistes-1_trams 35.5 >>> round(trams(17, 4, 3.3, 30), 2) # doctesttag: +TAG=1_autopistes-1_trams 30.0 >>> from autopistes import peatge >>> peatge(7, 12, 100, 'T', False) # doctesttag: +TAG=1_autopistes-2_peatge 35.5 >>> peatge(2, 15, 100, 'T', False) # doctesttag: +TAG=1_autopistes-2_peatge 63.0 >>> peatge(7, 12, 100, 'T', True) # doctesttag: +TAG=1_autopistes-2_peatge 32.5 >>> peatge(1, 3, 100, 'T', True) # doctesttag: +TAG=1_autopistes-2_peatge 13.0 >>> peatge(7, 12, 100, 'C', False) # doctesttag: +TAG=1_autopistes-2_peatge 72.5 >>> peatge(2, 15, 100, 'C', True) # doctesttag: +TAG=1_autopistes-2_peatge 68.0 >>> peatge(7, 12, 100, 'C', True) # doctesttag: +TAG=1_autopistes-2_peatge 40.5 >>> peatge(2, 15, 100, 'A', False) # doctesttag: +TAG=1_autopistes-2_peatge 85.0 >>> peatge(7, 12, 100, 'A', False) # doctesttag: +TAG=1_autopistes-2_peatge 57.5 >>> peatge(7, 12, 100, 'A', True) # doctesttag: +TAG=1_autopistes-2_peatge 35.0 Ecoparaules =========== >>> from ecoparaules import eco >>> eco('3x3=9') # doctesttag: +TAG=2_eco '-1-' >>> eco('adient') # doctesttag: +TAG=2_eco '-1-' >>> eco('77') # doctesttag: +TAG=2_eco '-1-' >>> eco('') # doctesttag: +TAG=2_eco '-1-' >>> eco('m') # doctesttag: +TAG=2_eco 'm' >>> eco('piMpi') # doctesttag: +TAG=2_eco 'M' >>> eco('pimpo') # doctesttag: +TAG=2_eco '-2-' >>> eco('ClatcLA') # doctesttag: +TAG=2_eco 't' >>> eco('Clatper') # doctesttag: +TAG=2_eco '-2-' >>> eco('holafhola') # doctesttag: +TAG=2_eco 'f' >>> eco('holafadeu') # doctesttag: +TAG=2_eco '-2-' >>> eco('HoLaQhOlA') # doctesttag: +TAG=2_eco 'Q' >>> eco('HolaqAdeu') # doctesttag: +TAG=2_eco '-2-' Proves d’atletisme ================== >>> from atletisme import cursa >>> cursa('100-llisos-F') # doctesttag: +TAG=3_cursa (100, 'LL') >>> cursa('100-relleus-M') # doctesttag: +TAG=3_cursa (400, 'RE') >>> cursa('110-tanques-M') # doctesttag: +TAG=3_cursa (110, 'TA') >>> cursa('400-relleus-F') # doctesttag: +TAG=3_cursa (1600, 'RE') >>> cursa('1500-obstacles-M') # doctesttag: +TAG=3_cursa (1500, 'OB') >>> cursa('1609-relleus-F') # doctesttag: +TAG=3_cursa (6436, 'RE') >>> cursa('20000-marxa-M') # doctesttag: +TAG=3_cursa (20000, 'MA') >>> cursa('10KM-llisos-M') # doctesttag: +TAG=3_cursa (10000, 'LL') >>> cursa('3KM-obstacles-F') # doctesttag: +TAG=3_cursa (3000, 'OB') >>> cursa('20KM-llisos-M') # doctesttag: +TAG=3_cursa (20000, 'LL')