Files
nsi/Activity_3_python/LangagePython_fonctions/Exercice43.html
T

117 lines
3.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html>
<head>
<title>Exercice 4.3</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("Exercice43");
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">Exercice 4.3</h1>
<div id="topic_breadcrumb">
<a href="Lesfonctions.html">Les fonctions</a> &rsaquo;&rsaquo; <a href="Exercices4.html">Exercices 4</a> &rsaquo;&rsaquo;
</div>
</div>
<div id="topic_header_nav">
<a href="Exercices4.html"><img src="img/arrow_up.png" alt="Parent"/></a>
<a href="Exercice42.html"><img src="img/arrow_left.png" alt="Previous"/></a>
<a href="Exercice44.html"><img src="img/arrow_right.png" alt="Next"/></a>
</div>
<div class="clear"></div>
</div>
<div id="topic_content">
<p></p>
<p class="rvps7"><span class="rvts12"></span><br/><span class="rvts11">1) Ecrire une fonction qui retourne la factorielle d'un nombre entier N.</span><br/><span class="rvts11">On rappelle que : N ! = 1×2×...×(N-1)×N</span><br/><span class="rvts11">Exemple :</span></p>
<p class="rvps8"><span class="rvts37">&gt;&gt;&gt;</span><span class="rvts38">&nbsp;</span><span class="rvts40">print</span><span class="rvts38">(factorielle(50))</span><br/><span class="rvts41">30414093201713378043612608166064768844377641568960512000000000000</span></p>
<p class="rvps7"><span class="rvts49">2) Comparez avec le résultat de la fonction&nbsp;</span><a class="rvts90" href="http://docs.python.org/3/library/math.html">factorial()</a><span class="rvts49">&nbsp;du module&nbsp;</span><span class="rvts76">math</span><span class="rvts49">.</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 facile de livres électroniques et documentation</a></p>
</div>
<div id="topic_footer">
<div id="topic_footer_content">
</div>
</div>
</body>
</html>