
Introducción a Python
Presentation
•
Computers
•
11th Grade
•
Hard
Leidis Soto
Used 5+ times
FREE Resource
10 Slides • 20 Questions
1
Python
Objetivo: Comprender los elementos básicos de Python
2
¿Qué es Python?
Lenguaje de programación de alto nivel
Creado por Guido van Rossum en 1991
Sintaxis simple y legible
Multiplataforma (Windows, Mac, Linux)
Usado en: desarrollo web, ciencia de datos, inteligencia artificial, automatización
3
Multiple Choice
¿Quién creó el lenguaje de programación Python?
Linus Torvalds
Guido van Rossum
Dennis Ritchie
Bjarne Stroustrup
4
Variables y tipos de datos
nombre = "Juan" # String (cadena)
edad = 17 # Integer (entero)
altura = 1.75 # Float (decimal)
es_estudiante = True # Boolean (booleano)
Reglas para nombres de variables
Comenzar con letra o guión bajo
No espacios (usar guión bajo)
No palabras reservadas
Sensible a mayúsculas y minúsculas
5
Match
Une cada variable con su tipo de dato:
edad = 16
nombre = "Ana"
promedio = 8.5
aprobado = True
int
str
float
bool
int
str
float
bool
6
Multiple Choice
¿Cuál de estos nombres de variables NO es válido en Python?
nombre_completo
1nombre
edad
miVariable
7
Multiple Choice
Si asignas nombre = "Carlos", ¿qué tipo de dato tiene la variable nombre?
Entero
Booleano
Cadena de caracteres
Lista
8
Multiple Choice
¿Qué tipo de dato almacena el valor True en Python?
cadena de caracteres
Decimal
9
Multiple Choice
Si tienes una variable edad = 14, ¿cómo cambiarías su valor a 15?
edad = 15
15 = edad
edad: 15
cambiar edad a 15
10
Multiple Choice
María está aprendiendo sobre los tipos de variables en Python. ¿Cuál de las siguientes opciones representa un tipo de variable que puede almacenar un número decimal?
int
str
float
bool
11
Operadores Aritméticos
a = 10
b = 3
suma = a + b # 13
resta = a - b # 7
multiplicacion = a * b # 30
division = a / b # 3.33...
division_entera = a // b # 3
modulo = a % b # 1 (residuo)
potencia = a ** b # 1000
Orden de operaciones:
Paréntesis
Potencias
Multiplicación y División
Suma y Resta
12
Multiple Choice
El resultado de la operación 3**2 es:
6
18
9
0.5
13
Multiple Choice
La operación 4+5*3 da como resultado
27
19
18
129
14
Multiple Choice
El resultado de la expresión (3+2**3)-6/2 es:
122
2.5
8.0
8
15
Multiple Choice
¿Cuál es el resultado de la expresión: 15 % 4?
3.75
3
4
1
16
17
Multiple Choice
La función input() siempre devuelve un valor de tipo string (cadena), incluso si el usuario ingresa un número.
verdadero
falso
18
Operadores de Comparación
a = 5
b = 3
igual a == b # False
diferente a != b # True
mayor a > b # True
menor a < b # False
mayor_igual a >= b # True
menor_igual a <= b # False
19
Multiple Choice
Si x = 7 y y = 10, ¿Cuál expresión es True?
x > y
x == y
x != y
x >= y
20
Estructuras Condicionales (if)
21
Drag and Drop
numero = int(input("Ingresa un número: "))
if numero > 0:
print("Positivo")
print("Negativo")
print("Cero")
22
AND (Y)
A | B | A AND B |
|---|---|---|
TRUE | TRUE | TRUE |
TRUE | FALSE | FALSE |
FALSE | TRUE | FALSE |
FALSE | FALSE | FALSE |
A | B | A OR B |
|---|---|---|
TRUE | TRUE | TRUE |
TRUE | FALSE | TRUE |
FALSE | TRUE | TRUE |
FALSE | FALSE | FALSE |
OR (O)
NOT
A | NOT A |
|---|---|
TRUE | FALSE |
FALSE | TRUE |
Ejemplo: TRUE AND FALSE AND NOT TRUE =FALSE
OPERADORES LÓGICOS
23
Multiple Choice
La expresión True or False and False es igual a True.
True
False
24
Multiple Choice
Si x=5 y y=10, la expresión (x>3 and y<15) es:
Verdadera
Falsa
Indefinida
Depende de x únicamente
25
Multiple Choice
Si a=8, ¿qué devuelve la condición (a>10 or a==8)?
Falso
Verdadero
Error
Ninguna de las anteriores
26
Multiple Choice
En una condición con or, ¿cuántas condiciones deben ser verdaderas para que toda la expresión sea verdadera?
Todas
Ninguna
Al menos una
Exactamente dos
27
28
Multiple Choice
¿Qué está mal en este código?
contador = 1
while contador <= 3:
print(contador)
La condición está mal
Falta incrementar el contador
El print está mal ubicado
No hay error
29
30
Multiple Choice
¿Qué imprime este código?
python
for i in range(3, 8, 2):
print(i, end=" ")
3 4 5 6 7
3 5 7
2 4 6 8
3 5 7 9
Python
Objetivo: Comprender los elementos básicos de Python
Show answer
Auto Play
Slide 1 / 30
SLIDE
Similar Resources on Wayground
23 questions
Simulasi Psikotes
Presentation
•
KG
24 questions
Adding and Subtracting Rational Expressions
Presentation
•
11th - 12th Grade
24 questions
Synthetic Division
Presentation
•
11th - 12th Grade
23 questions
LA TECNOLOGÍA COMO ÁREA DE CONOCIMIENTOS Y LA TÉCNICA COMO PRACTICA SOCIAL
Presentation
•
10th Grade
23 questions
Enthalpy, Exothermic, and Endothermic Reactions
Presentation
•
11th Grade
22 questions
Materi Informatika Kelas XI
Presentation
•
11th Grade
25 questions
Electron Configuration, Orbital Notation, & Dot diagrams
Presentation
•
9th - 12th Grade
21 questions
Claims
Presentation
•
11th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade