245 lines
No EOL
7.5 KiB
HTML
245 lines
No EOL
7.5 KiB
HTML
|
|
|
|
<!DOCTYPE html>
|
|
<html class="writer-html5" lang="de" >
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Mein erstes Programm — CompLib 0.2.3 Dokumentation</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="../_static/js/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
|
|
|
|
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
|
<script src="../_static/jquery.js"></script>
|
|
<script src="../_static/underscore.js"></script>
|
|
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
|
<script src="../_static/doctools.js"></script>
|
|
<script src="../_static/sphinx_highlight.js"></script>
|
|
<script src="../_static/translations.js"></script>
|
|
|
|
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
|
|
|
|
|
<link rel="index" title="Stichwortverzeichnis" href="../genindex.html" />
|
|
<link rel="search" title="Suche" href="../search.html" />
|
|
<link rel="next" title="Software Updaten" href="update.html" />
|
|
<link rel="prev" title="Programmierumgebung" href="codeServer.html" />
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav">
|
|
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search" >
|
|
|
|
|
|
|
|
<a href="../index.html">
|
|
|
|
|
|
|
|
|
|
<img src="../_static/compair-logo-white.svg" class="logo" alt="Logo"/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Dokumentation durchsuchen" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="current">
|
|
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Erste Schritte</a><ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="wifi.html">WLAN-Verbindung herstellen</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="codeServer.html">Programmierumgebung</a></li>
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">Mein erstes Programm</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="update.html">Software Updaten</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="secondProgram.html">Mein zweites Programm</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="thridProgram.html">Mein drittes Programm</a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../software/installation.html">Installationsanweisungen</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../other/usage.html">Beispiele</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../lib/index.html">compLib</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../other/hardware.html">Hardware</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" aria-label="top navigation">
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="../index.html">CompLib</a>
|
|
|
|
</nav>
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
<li><a href="../index.html" class="icon icon-home"></a> »</li>
|
|
|
|
<li><a href="index.html">Erste Schritte</a> »</li>
|
|
|
|
<li>Mein erstes Programm</li>
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
<a href="../_sources/gettingStarted/firstProgram.rst.txt" rel="nofollow"> Quelltext anzeigen</a>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="mein-erstes-programm">
|
|
<h1>Mein erstes Programm<a class="headerlink" href="#mein-erstes-programm" title="Permalink to this heading">¶</a></h1>
|
|
<p>Um mit der Programmierung zu beginnen, müssen wir zunächst einen neuen Ordner erstellen, in dem alle unsere Python-Dateien gespeichert werden.
|
|
<img alt="codeServerFolder" src="../_images/06_codeServerFolder.png" /></p>
|
|
<p>Sie können diesen Ordner nennen, wie Sie wollen, für dieses Beispiel heißt er <code class="docutils literal notranslate"><span class="pre">compAIR</span></code>.
|
|
Im nächsten Schritt erstellen wir unsere Datei <code class="docutils literal notranslate"><span class="pre">main.py</span></code>.
|
|
<img alt="codeServerFile" src="../_images/03_codeServerFile.png" /></p>
|
|
<p>Dann können wir beginnen, unseren Code in diese Datei zu schreiben.</p>
|
|
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">"Hallo Welt"</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Praktischerweise können wir die Datei auch über die VS-Code-Plattform ausführen.
|
|
<img alt="codeServerRun" src="../_images/04_codeServerRun.png" /></p>
|
|
<p>Dann öffnet sich ein Terminal, der die Ausgabe unseres Programms anzeigt.
|
|
<img alt="codeServerTerminal" src="../_images/05_codeServerTerminal.png" /></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="update.html" class="btn btn-neutral float-right" title="Software Updaten" accesskey="n" rel="next">Weiter <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="codeServer.html" class="btn btn-neutral float-left" title="Programmierumgebung" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Zurück</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
|
|
© Copyright 2022, Verein zur Förderung von Wissenschaft und Technik an Schulen (F-WuTS)
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
|
|
Erstellt mit <a href="http://sphinx-doc.org/">Sphinx</a> mit einem
|
|
|
|
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
|
|
|
|
bereitgestellt von <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |