INFORME
Integrante: KAREN DAYANA TROYA HERRERA
SEMESTRE: TERCERO
PARALELO: C
PRÁCTICA: #2
TEMA:
Operadores lógicos
OBJETIVO:
 Realizar la utilización de operadores lógicos y mejoramiento del uso del lenguaje de programación
“PHP”.
 Reconocer el uso de variables para el desarrollo del programa en “PHP”.
 Aprender a utilizar el nuevo lenguaje de programación de “PHP”.
RESULTADOS DE APRENDIZAJE
 La mejor comprensión del uso de lenguaje PHP
 Manipulación del servidor “XAMPP”
 Utilización de los operadores lógicos Switch Case
ACTIVIDADES:
- Realizar un ejercicio en php que permita ingresar
PHP1
<!DOCTYPE html PUBLIC "-
//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<form action="ejercicio21.php" method="post">
Masculino <input type="radio" name="genero" value= masculino>
Femenino <input type="radio" name="genero" value= femenino> <br>
Tu edad <input type="text" name="edad" size="4">
<input type="submit" value="Entrar">
</form>
<body>
</body>
</html>
PHP2
<!DOCTYPE html PUBLIC "-
//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
UNIVERSIDAD CENTRAL DEL ECUADOR
FACULTAD DE FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN
CARRERA DE LA PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES
DE LA INFORMÁTICA
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<?php
$genero = $_POST["genero"];
$edad = $_POST["edad"];
if ($genero == 'masculino') {
echo "Es de genero masculino y ";
}else{
echo "Es de genero femenino y ";
}
if ($edad <18) {
echo "es menor de edad.";
}else{
echo "es mayor de edad.";
}
?>
<body>
</body>
</html>
CAPTURAS DEL PROGRAMA
PROGRAMA FUNCIONANDO CON EL NÚMERO DEL MES CORRECTO
U2

U2

  • 1.
    INFORME Integrante: KAREN DAYANATROYA HERRERA SEMESTRE: TERCERO PARALELO: C PRÁCTICA: #2 TEMA: Operadores lógicos OBJETIVO:  Realizar la utilización de operadores lógicos y mejoramiento del uso del lenguaje de programación “PHP”.  Reconocer el uso de variables para el desarrollo del programa en “PHP”.  Aprender a utilizar el nuevo lenguaje de programación de “PHP”. RESULTADOS DE APRENDIZAJE  La mejor comprensión del uso de lenguaje PHP  Manipulación del servidor “XAMPP”  Utilización de los operadores lógicos Switch Case ACTIVIDADES: - Realizar un ejercicio en php que permita ingresar PHP1 <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Documento sin t&iacute;tulo</title> </head> <form action="ejercicio21.php" method="post"> Masculino <input type="radio" name="genero" value= masculino> Femenino <input type="radio" name="genero" value= femenino> <br> Tu edad <input type="text" name="edad" size="4"> <input type="submit" value="Entrar"> </form> <body> </body> </html> PHP2 <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> UNIVERSIDAD CENTRAL DEL ECUADOR FACULTAD DE FILOSOFÍA, LETRAS Y CIENCIAS DE LA EDUCACIÓN CARRERA DE LA PEDAGOGÍA DE LAS CIENCIAS EXPERIMENTALES DE LA INFORMÁTICA
  • 2.
    <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"content="text/html; charset=iso-8859-1" /> <title>Documento sin t&iacute;tulo</title> </head> <?php $genero = $_POST["genero"]; $edad = $_POST["edad"]; if ($genero == 'masculino') { echo "Es de genero masculino y "; }else{ echo "Es de genero femenino y "; } if ($edad <18) { echo "es menor de edad."; }else{ echo "es mayor de edad."; } ?> <body> </body> </html> CAPTURAS DEL PROGRAMA PROGRAMA FUNCIONANDO CON EL NÚMERO DEL MES CORRECTO