Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # tipos bàsicos de datos: int, float, str, bool
- # int: nros sin coma (nros enteros): ..... -3 -2 -1 0 1 2 3 .....
- # float: nros con coma: -25.25 -2.525 -252.5 (nros racionales)
- # str: (string o cadena): son literales "Hola a todos", '34.23', "a"
- # bool: (booleano, Boole) Solamente hay dos valores, True False
- # como averiguo el tipo de dato de una variable: type("23")
- # existen tipos de datos que pueden almacenar màs de un valor (colecciones)
- # print(): imprime el contenido entre paréntesis
- print("Hola")
- print(25.36)
- print(25 + 25 -0.25)
- # input(): captura el contenido del buffer del teclado COMO STRING
- nombre = input("Ingrese su nombre: ")
- print("Hola " + nombre)
Advertisement
Advertisement
Advertisement
RAW Paste Data
Copied
Advertisement