about | help | code help+videos | done | prefs |
konstans@stuy.edu introlistall
Dictionary Problems Be aware that codingbat requires that you return a list that contains a dictionary instead of just the dictionary. This is not normally how you write code with dictionaries it is a codingbat limitation.
makeDict squareDictionary squareDictionaryFromList combineLists reverseList
Challenging for now: categorize divisibilityDict
More List Problems!
countRange count2DRange filterRange filter2DRange filterline2DRange
processScores processScoresWithAbsent averageColumn
------Original 24 problems--------------
Testing Codingbat
Basic Calculation
Basic Booleans
monkey_trouble H parrot_trouble H
makes10 H near_hundred H pos_neg H
love6 near_ten (remember the remainder)
Decisions: (numerical)
diff21 H no_teen_sum sorta_sum
--- Second set 21 Problems ---
More booleans: (can be done without if statements, but using an if-statemnet can partition your logic)
Magic Values (more complex descisions)
Chocolate is easier than bricks:
Loop numbers
sumFromZeroToN H sumAtoB fiveSumFromZeroToN specialSumInclusive
specialSumExclusive sumOfFirstNSquares sumSquaresBetween sumOfPowers
Looping over digits
countDigits countOddDigits countPrimeDigits
Hailstone
------3rd set 40 problems--------------
String no loops
hello_name H make_abba H make_tags
make_out_word extra_end first_two
Strings and Loops
String no loops
hello_name H make_abba H make_tags
make_out_word extra_end first_two
Strings and Loops
isVowel countVowels noVowels isConsonant
Removal from strings
removeCharFromString removeFromString removeOuterSpaces
More String practice
double_char H count_hi H cat_dog
count_code end_other H xyz_there
------4th Set ------
Character Manipulation:
shiftCharacterByOne shiftCharacter
Rot13 and chr()/ord() related problems:
rot13Char rotXChar rot13 rotX myInt
List problems (no loops)
make_pi changeToSeven same_first_last H common_end has23
List problems - single loop
count_evens H MinOddValue ReplaceNegative big_diff centered_average
List/String problems Do not use built in string methods that solve this. Use loops.
List methods should be used for these:
zipLists
cleanList
MergeWords
foundFirst
stripList
Authoring docs
Copyright Nick Parlante 2017 - privacy