Testpage: Unterschied zwischen den Versionen

Aus Eduwiki
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 12: Zeile 12:




<br /><syntaxhighlight lang="python3" line="1">
<br />
 
 
 
 
 
 
<syntaxhighlight lang="python" line="1">
# Import the modules
# Import the modules
import sys
import sys
import random
import random


ans = True
ans = True


while ans:
while ans:
     question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ")
     question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ")
      
      
     answers = random.randint(1,8)
     answers = random.randint(1,8)
      
      
     if question == "":
     if question == "":
         sys.exit()
         sys.exit()
      
      
     elif answers == 1:
     elif answers == 1:
         print "It is certain"
         print "It is certain"
      
      
     elif answers == 2:
     elif answers == 2:
         print "Outlook good"
         print "Outlook good"
      
      
     elif answers == 3:
     elif answers == 3:
         print "You may rely on it"
         print "You may rely on it"
      
      
     elif answers == 4:
     elif answers == 4:
         print "Ask again later"
         print "Ask again later"
      
      
     elif answers == 5:
     elif answers == 5:
         print "Concentrate and ask again"
         print "Concentrate and ask again"
      
      
     elif answers == 6:
     elif answers == 6:
         print "Reply hazy, try again"
         print "Reply hazy, try again"
      
      
     elif answers == 7:
     elif answers == 7:
         print "My reply is no"
         print "My reply is no"
      
      
     elif answers == 8:
     elif answers == 8:
         print "My sources say no"
         print "My sources say no"
</syntaxhighlight>
</syntaxhighlight>

Version vom 5. März 2020, 13:09 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="python" line="1">

  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>