• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 7 páginas
Notas de lectura

"Python Basics: Variables and Data Types Explained"

Document preview thumbnail
Vista previa 2 fuera de 7 páginas

This document provides an introduction to variables and data types in Python. It covers how to declare and use variables, different data types such as integers, floats, strings, lists, tuples, dictionaries, and booleans, and best practices for working with them. The document is designed for beginners who want to build a strong foundation in Python programming.

Vista previa del contenido

PYTHON
 Python is simple and easy.
 Free and open source.
 High level language.
 Developed by Guido van Rossum.
 Portable.

o Ex.,
Print(“Hello World”)


Python Character Set
 Letters – A to Z, a to z
 Digits – 0 to 9
 Special Symbols - +,-,*,/ etc.
 Whitespaces – Blank space,tab,carriage
return,newline,formfed
 Other characters – Python can process all ASCII and
Unicode characters as part of data or literals

o Ex.,
Print(“Sai is my name.”, “My age is 19.”)

Output : Sai is my name .
My age is 19.

o Ex.,
Print(20)
Output : 20

Variables
A variable is a name given to a memory location in a program.

, Name = “Sai”
Age = 20
Price = 25.99

o Ex.,
name = “Sai”
age = 20
price = 25.99
print(name)

Output : Sai

Rules for Identifiers
1. Identifiers can be combination of uppercase and lowercase
letters,digits or an underscore(_).
So myVariable, variable_1,variable_for_print all are valid
python identifiers.
2. An identifier can not start with digit . So while variable1 is
valid , 1variable is not valid.
3. We can’t use special symbols like !,#,@,%,$ etc in our
identifier.
4. Identifier can be of any length.

Data Types
 Integer
 String
 Float
 Boolean
 None

o Ex.,
age = 20
old = True

Libro relacionado
 image
Deepali Srivastava Ultimate Python Programming
Editorial: 2024 ISBN: 9789355516558 Edición: Desconocido

Información del documento

Subido en
28 de febrero de 2025
Número de páginas
7
Escrito en
2024/2025
Tipo
Notas de lectura
Profesor(es)
Prof.samrin
Contiene
Todas las clases
$8.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
1
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes