Python Flashcards

Conocer las bases, métodos y funciones de python

1
Q

Python3 -m venv nombre_carpeta

A

Crea un entorno virtual de python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Source nombre_carpeta/bin/activate

A

Activa el ambiente virtual

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Que hace de deactivate?

A

Desactiva el ambiente virtual

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Para que sirve type()?

A

Comprueba el tipo de dato de la variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Para que sirve isnumeric()?

Ej:. Variable.isnumeric()

A

Es un método de los strings que comprueba si dentro hay números

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Que hace: import random?

A

Importa el módulo random a python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Que hace random.randint()

A

Devuelve un número aleatorio

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Que hace random.randint(0,10)

A

Devuelve un número aleatorio entre 0 y 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly