Entropia:Sandkasten: Unterschied zwischen den Versionen

aus dem Wiki des Entropia e.V., CCC Karlsruhe
Keine Bearbeitungszusammenfassung
(mal erweitert um noch bissel CSS testen zu koennen)
Zeile 1: Zeile 1:
== Spielwiese ==
===Links===
[[Entropia:Sandkasten|diese Seite]] [[Hauptseite]] [[doesnotexist|gibts noch nicht]] [https://entropia.de entropia.de]
===Code===
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
from time import localtime
from time import localtime
Zeile 22: Zeile 26:
{{Youtube|id=0CwkyJA_Crs}}
{{Youtube|id=0CwkyJA_Crs}}


foobar
===foobar===
 
* foo
* foo
* fii
* fuu
 
===barfoo===
# oans
# zwoar
# viele
 
 
===noch mehr topic===

Version vom 16. Dezember 2012, 20:11 Uhr

Spielwiese

Links

diese Seite Hauptseite gibts noch nicht entropia.de

Code

from time import localtime

activities = {8: 'Sleeping',
              9: 'Commuting',
              17: 'Working',
              18: 'Commuting',
              20: 'Eating',
              22: 'Resting' }

time_now = localtime()
hour = time_now.tm_hour

for activity_time in sorted(activities.keys()):
    if hour < activity_time:
        print activities[activity_time]
        break
else:
    print 'Unknown, AFK or sleeping!'

foobar

  • foo
  • foo
  • fii
  • fuu

barfoo

  1. oans
  2. zwoar
  3. viele


noch mehr topic