Files

116 lines
3.4 KiB
HTML

<html>
<head>
<title>L'instruction def</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="HelpNDoc Personal Edition 6.3.0.298">
<meta name="description" content="" />
<meta name="keywords" content="">
<link type="text/css" rel="stylesheet" media="all" href="css/reset.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/base.css" />
<link type="text/css" rel="stylesheet" media="all" href="css/hnd.css" />
<!--[if lte IE 8]>
<link type="text/css" rel="stylesheet" media="all" href="css/ielte8.css" />
<![endif]-->
<style type="text/css">
#topic_header
{
background-color: #EFEFEF;
}
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
if (top.frames.length == 0)
{
var sTopicUrl = top.location.href.substring(top.location.href.lastIndexOf("/") + 1, top.location.href.length);
top.location.href = "Activite_decouverte_Python.hml?" + sTopicUrl;
}
else
{
var bTocSelected = false;
(function waitForTOC()
{
if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("Linstructiondef");
bTocSelected = true;
}
if (!bTocSelected) setTimeout(function() { waitForTOC(); }, 300);
})();
}
});
</script>
</head>
<body>
<div id="topic_header">
<div id="topic_header_content">
<h1 id="topic_header_text">L'instruction def</h1>
<div id="topic_breadcrumb">
<a href="Lesfonctions.html">Les fonctions</a> &rsaquo;&rsaquo;
</div>
</div>
<div id="topic_header_nav">
<a href="Lesfonctions.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="Lesfonctions.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="Exemplen1.html"><img src="img/arrow_right.png" alt="Next"/></a>
</div>
<div class="clear"></div>
</div>
<div id="topic_content">
<p></p>
<h4 class="rvps13"><span class="rvts0"><span class="rvts59">Syntaxe</span></span></h4>
<p class="rvps8"><span class="rvts46">def</span><span class="rvts38">&nbsp;</span><span class="rvts41">nom_de_la_fonction</span><span class="rvts38">(parametre1, parametre2, parametre3, ...):</span><br/><span class="rvts75">&nbsp; &nbsp; </span><span class="rvts52">""" Documentation</span><br/><span class="rvts52">qu'on peut écrire</span><br/><span class="rvts52">sur plusieurs lignes """</span><span class="rvts38">&nbsp;</span><span class="rvts39"># docstring entouré de 3 guillemets (ou apostrophes)</span><br/><span class="rvts75">&nbsp; &nbsp; </span><span class="rvts38">bloc d'instructions &nbsp;</span><span class="rvts39"># attention à l'indentation</span><br/><span class="rvts75">&nbsp; &nbsp; </span><span class="rvts46">return</span><span class="rvts38">&nbsp;resultat &nbsp; </span><span class="rvts39"># la fonction retourne le contenu de la variable resultat</span></p>
<p></p>
<p class="rvps4" style="clear: both;"><span class="rvts15">Créé avec HelpNDoc Personal Edition: </span><a class="rvts16" href="https://www.helpndoc.com/fr">Générateur de documentation et EPub gratuit</a></p>
</div>
<div id="topic_footer">
<div id="topic_footer_content">
</div>
</div>
</body>
</html>