Testpage: Unterschied zwischen den Versionen
Aus Eduwiki
Andyg (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Andyg (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 6: | Zeile 6: | ||
</tagcloud> | </tagcloud> | ||
<br /> | <br /><syntaxhighlight lang="python3" line="1"> | ||
# Import the modules | |||
import sys | |||
import random | |||
ans = True | |||
while ans: | |||
question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ") | |||
answers = random.randint(1,8) | |||
if question == "": | |||
sys.exit() | |||
elif answers == 1: | |||
print "It is certain" | |||
elif answers == 2: | |||
print "Outlook good" | |||
elif answers == 3: | |||
print "You may rely on it" | |||
elif answers == 4: | |||
print "Ask again later" | |||
elif answers == 5: | |||
print "Concentrate and ask again" | |||
elif answers == 6: | |||
print "Reply hazy, try again" | |||
elif answers == 7: | |||
print "My reply is no" | |||
elif answers == 8: | |||
print "My sources say no" | |||
</syntaxhighlight> |
Version vom 5. März 2020, 09:41 Uhr
Übersicht
{{#if:Datei:Roadmap.JPG|
}}
{{#if:Big Data| }} {{#if:| }} {{#if:| {{#if:| | }} }} {{#if:| {{#if:| | }} }} {{#if:| {{#if:| | }} }} {{#if:| {{#if:| | }} }} {{#if:| {{#if:| | }} }} {{#if:| }}Themenfeld | Big Data |
---|---|
Autor | [[{{{Autor}}}]] |
Editiert am | 05.3.2020 |
Material | [[:{{{Material}}}|{{{Material_Name}}}]] |
Material | [[:{{{Material}}}|{{{Material}}}]] |
[[:{{{Material1}}}|{{{Material1_Name}}}]] | |
[[:{{{Material1}}}|{{{Material1}}}]] | |
[[:{{{Material2}}}|{{{Material2_Name}}}]] | |
[[:{{{Material2}}}|{{{Material2}}}]] | |
[[:{{{Material3}}}|{{{Material3_Name}}}]] | |
[[:{{{Material3}}}|{{{Material3}}}]] | |
[[:{{{Material4}}}|{{{Material4_Name}}}]] | |
[[:{{{Material4}}}|{{{Material4}}}]] | |
Unterseiten |
<tagcloud style="background: black; width: 20%;"> min_size=55 exclude=browse </tagcloud>
<syntaxhighlight lang="python3" line="1">
- Import the modules
import sys import random
ans = True
while ans:
question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ") answers = random.randint(1,8) if question == "": sys.exit() elif answers == 1: print "It is certain" elif answers == 2: print "Outlook good" elif answers == 3: print "You may rely on it" elif answers == 4: print "Ask again later" elif answers == 5: print "Concentrate and ask again" elif answers == 6: print "Reply hazy, try again" elif answers == 7: print "My reply is no" elif answers == 8: print "My sources say no"
</syntaxhighlight>