Basic Built-in Flashcards

1
Q

Imprimir un string x

A

print(“x”)

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

Imprimir una suma n + m

A

print(n + m)

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

Imprimir una multiplicacion n * m

A

print(n * m)

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

Imprimir un espacio en blanco

A

print()

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

Imprimir un string x y un integer n

A

print(“x”, n)

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

Imprimir strings x y concadenados con espacio entre ellos

A
print("x " + "y")
o
print("x " "y")
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Imprimir variables str a b concatenados con espacio entre ellos

A

print(a + “ “ + b)

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

Imprimir tipo de variable de a

A

print(type(a))

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

Imprimir índice n de string x

A

print(x[n])

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

Imprimir índice n negativo de string x

A

print(x[-n])

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

Imprimir rango n m de string x

A

print(x[n:m])

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

Imprimir rango n m de string x con salto l

A

print(x[n:m:l])

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

Imprimir rango n m de string x con salto l invertido

A

print(x[n:m:-l])

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

Imprimir elemento n, de variable a de lista de strings x0 a x2

A

print(a[n])

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

Imprimir índice m de elemento xn, de variable a de lista de strings x0 a x2

A

print(a[n][m])

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

Imprimir string x, n veces

A

print(“x” * n)

17
Q

Imprimir string x, n + m veces

A

print(“x” * (n + m))

18
Q

Imprimir string x, n veces y un numero m concatenado

A

print(“x” * n + “m”)

19
Q

Indicar que una variable/expresion a es string

A

str(a)

20
Q

Crear varios bloques de código con bloques de código de primer y segundo nivel

A
sin nivel:
-> primer nivel:
-> -> segundo nivel
sin nivel:
-> primer nivel:
-> -> segundo nivel
-> primer nivel:
-> -> segundo nivel
21
Q

Crear punto de introducción de usuario tras visualización de string x

A

input(“x”)

22
Q

Crear punto de introduccion de usuario

A

input()

23
Q

Indicar que una variable/expresion a es integer

A

int(a)

24
Q

Imprimir True o False si un elemento a está contenido en un elemento b

A

print(a in b)

25
Q

Obtener la longitud de elementos de una secuencia a

A

len(a)

26
Q

Obtener la mayor posicion de elemento de una secuencia a

A

max(a)

27
Q

Obtener el menor elemento de una secuencia a

A

min(a)

28
Q

Imprimir a sustituyendo el caracter final por x

A

print(a, end=”x”)

29
Q

Imprimir a b sustituyendo los espacios por x

A

print(a, b, sep=”x”)

30
Q

Imprimir a b sustituyendo los espacios por x y el caracter final por y

A

print(a, b, sep=”x”, sep=”y”)