Back to marketplace

Types Of Functions

No description yet. This curated deck is ready for daily study.

Total cards: 22•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (22)

#1
Front (Question)

How to use range() function

Back (Answer)

for I in range(0,20,2) Print(i) Output= 2 4 6 8 10 12 14 16 18

#2
Front (Question)

Python range(start, stop, step)

Back (Answer)

Start Stop 0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 , 9, 10 Step (2) Output 0 2 4 6 8

#3
Front (Question)

What are tuples?

Back (Answer)

Tuples are an ordered sequences of items, just like lists. The main difference between tuples and lists is that tuples cannot be changed.

#4
Front (Question)

What are dictionaries?

Back (Answer)

Dictionaries are data structures that map unique keys to value, but dictionary keys can be any immutable data type

#5
Front (Question)

How to use dictionary values as a function

Back (Answer)

webstersDict[‘marathon’] Output- a running race that is about 26 miles

#6
Front (Question)

How to add new key-value pair to an existing dictionary

Back (Answer)

webstersDict[‘shoe’] = ‘an external covering for the human foot’

#7
Front (Question)

How to update dictionary keys

Back (Answer)

webstersDict update({‘ran’ : ‘past tense of run’, ‘shoes’ : ‘plural of shoe’})

#8
Front (Question)

How to use get() method

Back (Answer)

Story count = {‘is’ : 100,’the’ : 90, ‘michael’ : 12, ‘runs’ : 5} storycount.get(‘Michael’) Output- 12

#9
Front (Question)

pop(method)

Back (Answer)

The pop method removes a key and returns the value

#10
Front (Question)

How to use pop() method

Back (Answer)

storyCount.pop(‘the’) Output- 90

#11
Front (Question)

What is keys() method And how is it used?

Back (Answer)

The keys method returns the keys of the dictionary as a dictionary view object. keys() type(storyCount.keys()) Output- dict_keys

#12
Front (Question)

What is values() method?

Back (Answer)

The values method returns the values in the dictionary

#13
Front (Question)

How to use values() method?

Back (Answer)

storyCount.values() Output- dict_values([100, 12, 5])

#14
Front (Question)

What is items() method?

Back (Answer)

The items method returns a dictionary view object

#15
Front (Question)

How to use items() method

Back (Answer)

list(webstersDict.items()) Output-[(‘person’,, ‘a human being’)] Etc.

#16
Front (Question)

What are loops?

Back (Answer)

A for loop is used for iterating over a sequence (list, tuple, dictionary, string, etc).

#17
Front (Question)

How to use loops?

Back (Answer)

myName = “Michael” for x in myName: print(x) Output- M i c h a e l

#18
Front (Question)

How to use loops for index?

Back (Answer)

list(range(0,10)) Output- [0,1,2,3,4,5,6,7,8,9]

#19
Front (Question)

What is enumerate function?

Back (Answer)

The enumerate function returns a tuple containing a count for every iteration (from start which defaults to 0)

#20
Front (Question)

How to use enumerate?

Back (Answer)

DataScienceTools = [‘Python’, ‘R’, ‘SQL’, ‘Git’ ] for index, tool in enumerate(dataScienceTools): print(index,tool) Output- 0 Python 1 R 2 SQL 3 Git

#21
Front (Question)

How to convert strings to upper or lower case?

Back (Answer)

upper() method lower() method

#22
Front (Question)

What is a comment in python and how is it used?

Back (Answer)

#This is a comment print("Hello, World!")