Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
user:hof:pyeditor [2026-04-13 11:32] – [Exercises] hofuser:hof:pyeditor [2026-04-16 19:59] (aktuell) hof
Zeile 1: Zeile 1:
 # Bottom Python Editor # Bottom Python Editor
-<html><script type="module" src="https://bottom.ch/editor/latest/bottom-exercise.js"></script></html>+<html><script type="module" src="https://bottom.ch/editor/stable/bottom-exercise.js"></script></html>
  
 Bottom Editor offers a standalone editor version at [[https://bottom.ch/editor/]] and a web component embeddable as normal HTML elements after loading the module once. See the [[https://bottom.ch/editor/stable/doc/|public documentation]] for all options. Bottom Editor offers a standalone editor version at [[https://bottom.ch/editor/]] and a web component embeddable as normal HTML elements after loading the module once. See the [[https://bottom.ch/editor/stable/doc/|public documentation]] for all options.
Zeile 192: Zeile 192:
 <code html> <code html>
 <html><script type="module" src="https://bottom.ch/editor/latest/bottom-exercise.js"></script></html> <html><script type="module" src="https://bottom.ch/editor/latest/bottom-exercise.js"></script></html>
-<html><bottom-exercise>+<html><bottom-exercise id="sum-to_n">
             Write a function <tt>sum_to(n)</tt> that returns             Write a function <tt>sum_to(n)</tt> that returns
             <tt>1 + 2 + &hellip; + n</tt>. Return <tt>0</tt> for             <tt>1 + 2 + &hellip; + n</tt>. Return <tt>0</tt> for
Zeile 208: Zeile 208:
 </code> </code>
  
-<html><bottom-exercise+<html><bottom-exercise id="sum-to_n"> 
-        <div slot="prompt"> +            Write a function <tt>sum_to(n)</tt> that returns 
-            <p>Write a function <code>sum_to(n)</tt> that returns +            <tt>1 + 2 + &hellip; + n</tt>. Return <tt>0</tt> for 
-            <tt>1 + 2 + &hellip; + n</code>. Return <tt>0</tt> for +            <tt>n &le; 0</tt>
-            <tt>n &le; 0</tt>.</p> +        <script type="text/x-starter">
-        </div> +
-        <template data-type="starter">+
 def sum_to(n): def sum_to(n):
     pass     pass
-        </template+        </script
-        <template data-type="test">+        <script type="text/x-test">
 assert sum_to(5) == 15, "sum_to(5) should be 15" assert sum_to(5) == 15, "sum_to(5) should be 15"
 assert sum_to(1) == 1, "sum_to(1) should be 1" assert sum_to(1) == 1, "sum_to(1) should be 1"
 assert sum_to(0) == 0, "sum_to(0) should be 0" assert sum_to(0) == 0, "sum_to(0) should be 0"
-        </template+        </script
-    </bottom-exercise></html>+</bottom-exercise></html>
  
  • user/hof/pyeditor.1776079977.txt.gz
  • Zuletzt geändert: 2026-04-13 11:32
  • von hof