<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FCrearFunci%C3%B3n-6</id>
	<title>Curso de Programación en Python/CrearFunción-6 - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cabal.mx/index.php?action=history&amp;feed=atom&amp;title=Curso_de_Programaci%C3%B3n_en_Python%2FCrearFunci%C3%B3n-6"/>
	<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/CrearFunci%C3%B3n-6&amp;action=history"/>
	<updated>2026-05-21T08:56:00Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.32.1</generator>
	<entry>
		<id>https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/CrearFunci%C3%B3n-6&amp;diff=6265&amp;oldid=prev</id>
		<title>Rrc: /* CrearFunción-6.py */</title>
		<link rel="alternate" type="text/html" href="https://wiki.cabal.mx/index.php?title=Curso_de_Programaci%C3%B3n_en_Python/CrearFunci%C3%B3n-6&amp;diff=6265&amp;oldid=prev"/>
		<updated>2014-10-02T04:16:44Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;CrearFunción-6.py&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
* [[:#CrearFunción-6.py | CrearFunción-6.py]]&lt;br /&gt;
** [[:#Resultado | Resultado]]&lt;br /&gt;
** [[:#Explicación | Explicación]]&lt;br /&gt;
&lt;br /&gt;
== CrearFunción-6.py ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;quot;GESHI_FANCY_LINE_NUMBERS&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python3&lt;br /&gt;
#-*-coding: utf-8 -*-&lt;br /&gt;
 &lt;br /&gt;
def hola( ):&lt;br /&gt;
  print( &amp;#039;Hola!&amp;#039; )&lt;br /&gt;
 &lt;br /&gt;
def area(ancho, altura ):&lt;br /&gt;
  return ancho * altura&lt;br /&gt;
 &lt;br /&gt;
def print_bienvenido( nombre ):&lt;br /&gt;
  print( &amp;#039;Bienvenido,&amp;#039;, nombre )&lt;br /&gt;
 &lt;br /&gt;
def ingreso_positivo( prompt ):&lt;br /&gt;
  numero = float( input( prompt ) )&lt;br /&gt;
  while numero &amp;lt;= 0:&lt;br /&gt;
    print( &amp;#039;Debe ser un número positivo&amp;#039; )&lt;br /&gt;
    numero = float(input( ) )&lt;br /&gt;
  return numero&lt;br /&gt;
&lt;br /&gt;
nombre = input( &amp;#039;Tu Nombre: &amp;#039; )&lt;br /&gt;
hola( )&lt;br /&gt;
print_bienvenido( nombre )&lt;br /&gt;
print( )&lt;br /&gt;
print( &amp;#039;Para calcular el área de un rectangulo,&amp;#039; )&lt;br /&gt;
print( &amp;#039;escibes el ancho y altura abajo.&amp;#039; )&lt;br /&gt;
print( )&lt;br /&gt;
w = ingreso_positivo( &amp;#039;Ancho: &amp;#039; )&lt;br /&gt;
h = ingreso_positivo( &amp;#039;Altura: &amp;#039; )&lt;br /&gt;
 &lt;br /&gt;
print( &amp;#039;Ancho =&amp;#039;, w, &amp;#039; Altura =&amp;#039;, h, &amp;#039; entonces área =&amp;#039;, area( w, h ) )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Resultado ===&lt;br /&gt;
&lt;br /&gt;
[rrc@Pridd PythonClase]$ ./CrearFuncion-6.py &lt;br /&gt;
 Tu Nombre: Richard&lt;br /&gt;
 Hola!&lt;br /&gt;
 Bienvenido, Richard&lt;br /&gt;
 &lt;br /&gt;
 Para calcular el área de un rectangulo,&lt;br /&gt;
 escibes el ancho y altura abajo. &lt;br /&gt;
 &lt;br /&gt;
 Ancho: 4&lt;br /&gt;
 Altura: 6&lt;br /&gt;
 Ancho = 4.0  Altura = 6.0  entonces área = 24.0&lt;br /&gt;
&lt;br /&gt;
=== Explicación ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Programación en Python]]&lt;br /&gt;
[[Category:PythonCabal]]&lt;br /&gt;
[[Category:CursoPython]]&lt;/div&gt;</summary>
		<author><name>Rrc</name></author>
		
	</entry>
</feed>