Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Python

Programacion python

QuestionAnswer
Display output print()_____print("Hi") → Hi---
Get user input input()_____input("Name")---
Assign value to variable =_____x=5---
Convert to integer int()_____int("5") → 5---
Convert to float float()_____float("2.5") → 2.5---
Convert to string str()_____str(5) → "5"---
Convert to boolean bool()_____bool(1) → True---
Add numbers +_____2+3 → 5---
Subtract numbers -_____5-2 → 3---
Multiply numbers _____2*3 → 6---
Divide numbers /_____5/2 → 2.5---
Integer division //_____5//2 → 2---
Modulo (remainder) %_____5%2 → 1---
Power operation _____2**3 → 8---
Equal comparison ==_____5==5 → True---
Not equal comparison !=_____5!=3 → True---
Greater than comparison >_____5>3 → True---
Less than comparison <_____2<3 → True---
Greater or equal >=_____5>=5 → True---
Less or equal <=_____3<=5 → True---
Logical AND and_____True and False → False---
Logical OR or_____True or False → True---
Logical NOT not_____not True → False---
Increment variable +=_____x=1→x+=1→2---
Conditional statement if_____if 1<2---
For loop for_____for i in[1]---
While loop while_____while x<1---
Break loop break_____break---
Continue loop continue_____continue---
Create list list_____[1,2,3]---
Create tuple tuple_____(1,2)---
Create set set_____{1,2}---
Create dictionary dict_____{"a":1}---
Access element []_____[1,2][0] → 1---
Get length len()_____len([1,2]) → 2---
Define function def_____def f():---
Return value return_____return x--- def sumar(a, b): return a + b resultado = sumar(2, 3) print(resultado)
Append element append()_____[1].append(2)---
Insert element insert()_____[1].insert(0,9)---
Extend list extend()_____[1].extend([2])---
Remove last item pop()_____[1,2].pop()→2---
Count occurrences count()_____[1,1].count(1)→2---
Find index index()_____[1,2].index(2)→1---
Sort list sort()_____[2,1].sort()---
Sorted copy sorted()_____sorted([2,1])→[1,2]---
Uppercase string upper()_____"a".upper()→"A"---
Lowercase string lower()_____"A".lower()→"a"---
Remove spaces strip()_____" a ".strip()→"a"---
Replace text replace()_____"a".replace("a","b")---
Split string split()_____"a,b".split(",")---
Generate range range()_____list(range(3))---
Zip iterables zip()_____list(zip([1],[2]))---
Try block try_____try---
Catch exception except_____except---
Finally block finally_____finally---
Raise exception raise_____raise Error---
Sum values sum()_____sum([1,2])→3---
Minimum value min()_____min([1,2])→1---
Maximum value max()_____max([1,2])→2---
Absolute value abs()_____abs(-5)→5---
Round number round()_____round(3.6)→4---
Get type type()_____type(5)→int---
Check all true all()_____all([1,True])→True---
Check any true any()_____any([0,1])→True---
List comprehension list comprehension_____[x for x in[1]]---
Lambda function lambda_____(lambda x:x+1)(1)→2--- x = 10 suma = lambda x : x + 3 print(suma(x))
Map function map()_____list(map(abs,[-1]))--- palabras = ["hola", "mundo"] resultado = map(str.upper, palabras) print(list(resultado))
Shuffle list, mezclar los elementos de una lista al azar mezclar los elementos de una lista al azar shuffle()_____random.shuffle([1,2]) import random lista = [1,2,3,4] random.shuffle(lista) print(lista)
Exit program sys_____sys.exit()---, import sys
Created by: yizuztineo
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards