Back to marketplace

Programming

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

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

Card preview (13)

#1
Front (Question)

What is the structure of a for loop

Back (Answer)

For i in range (0,10)

#2
Front (Question)

What does the break command do

Back (Answer)

Breaks the loop when the condition is reached or when break shows up in the program

#3
Front (Question)

What is the structure of while loop

Back (Answer)

While(i<——)

#4
Front (Question)

What is the list comprehension structure

Back (Answer)

vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’] If text[i] in vowels: print(“——“)

#5
Front (Question)

How do you use a counter

Back (Answer)

Count=0 If character fits the condition(s) Count=count+1

#6
Front (Question)

What’s important in a loop

Back (Answer)

• always updated the i counter - i=i+1 • remember to have a counter and stopping condition - (0,10)

#7
Front (Question)

What is the structure of the length command

Back (Answer)

Length=len(——)

#8
Front (Question)

How do you separate out a single character from a string

Back (Answer)

For letter k: School=“kisc” Print(school[0])

#9
Front (Question)

How do you separate out multiple letter from a string

Back (Answer)

For ki: School=“kisc” Print(school[0:2])

#10
Front (Question)

What will this print: School=“kisc” Print(school[2:])

Back (Answer)

Everything after 2, including 2

#11
Front (Question)

What will this print: School=“kisc” Print(school[:2])

Back (Answer)

Everything before 2, not including 2

#12
Front (Question)

What is important to remember for string handling

Back (Answer)

• Remember that the first letter of the string is counted as 0 and not 1 • always use [ ]

#13
Front (Question)

What is important to remember for list comprehension

Back (Answer)

• be very specific - for example ‘a’ and ‘A’ are two different things • always use [ ] and ‘ ’ around whatever that is part of the list