Py
Python next steps
The next step after the starter bank. Write right away; get one wrong and Wick shows you how your code really runs.
0 / 80 solved
Functions Default arguments, several return values0 / 9
#004Rowing boat hireNo price given? Use 30 an hourStarterFunctions3 min#005A bouquet to giveSkip a parameter, change the wrapStarterFunctions3 min#006Room at the bike rack?Return two numbers at onceStarterFunctions Strings3 min#007Fastest vs slowestUnpack a tuple into two namesStarterFunctions3 min#008Over the bag limit?Pass as many bags as you likeBasicFunctions5 min#009Chat effectsKeep functions in a dict, pick oneBasicFunctions Dicts5 min#010Picking big applesPass a function in as an argumentBasicFunctions Loops5 min#011Time in the study roomWrite a small helper functionBasicFunctions Strings5 min#012Packing moving boxesFill in order, new box when it's fullMini challengeFunctions Loops8 minComprehensions A list in one line0 / 9
#001Square them allSquares in one list comprehensionStarterComprehensions Lists3 min#013Ages next yearAdd 1 to every numberStarterComprehensions Lists3 min#014Overdue library booksAdd an if to the comprehensionStarterComprehensions Conditions3 min#015How many kinds of bird?A set comprehension drops repeatsStarterComprehensions Dicts3 min#016Pet ages in monthsBuild a dict in one lineStarterComprehensions Dicts3 min#017Restaurant waiting listAdd numbers with enumerateBasicComprehensions Strings4 min#018Tomato growthLine up two lists with zipBasicComprehensions Lists4 min#019The bakery shelfLeave out what's sold outBasicComprehensions Dicts4 min#020Free throw practiceRead three lists side by sideMini challengeComprehensions Conditions7 minDicts Dicts and sets, fluently0 / 10
#030Scoops leftA missing flavor counts as 0StarterDicts3 min#031Movies we both wantUse sets to find what both lists shareStarterDicts Lists3 min#032Museum guest bookEach person counts onceStarterDicts2 min#033Thirsty plantsitems() gives name and days at onceStarterDicts Loops3 min#034Dice tallyHow often each face came upBasicDicts Loops4 min#035Wardrobe by colorGroup in one line with setdefaultBasicDicts Lists4 min#036Find my seatFlip the seating chart aroundBasicDicts Comprehensions3 min#037Camping gearAdd up two packing listsBasicDicts Loops4 min#038Sticker swapWhat you lack, what your friend lacksMini challengeDicts Lists6 min#039Breakfast ordersWho ordered each dish, no repeatsMini challengeDicts Sorting6 minStrings String methods0 / 9
#021Shelf labelsTrim spaces, capitalise each wordStarterStrings3 min#022Recipe, spelled outSwap the short form for the wordStarterStrings3 min#023Express parcelsDoes the code start with EX?StarterStrings Conditions3 min#024Fruit price tagsAlways two decimal placesStarterStrings Numbers3 min#025Leaderboard lineSplit a line into name and scoreBasicStrings5 min#026Name badges"Family, Given" becomes "Given Family"BasicStrings5 min#027Bus stop signJoin the stop names togetherBasicStrings Loops5 min#028Check the pickup codeSix digits once spaces are goneBasicStrings Conditions4 min#029Shopping noteCount how many things to buyMini challengeStrings Loops8 minSorting Sort the way you want0 / 8
#002Cheapest firstSort by price, low to highBasicSorting Lists4 min#040Long jump boardFarthest jump firstStarterSorting Lists2 min#041Short words firstSort by length, not by letterStarterSorting Strings3 min#042Heaviest in the bagmax takes a key tooStarterSorting Lists3 min#043Phone contactsAlphabetical, ignoring caseBasicSorting Strings4 min#044Reading clubMost pages read comes firstBasicSorting Dicts4 min#045Fun run timesSort by seconds, not by textBasicSorting Strings5 min#046Sports day tablePoints first, then team nameMini challengeSorting Lists6 minClasses Your own types0 / 9
#003Click counterEach click adds oneBasicClasses5 min#055Pet tagA name and a kind on a tagStarterClasses3 min#056Burger pricePatties and cheese make the priceStarterClasses Conditions3 min#057Cinema signThe title, then the yearStarterClasses Strings3 min#058Water bottleEach sip leaves a bit lessBasicClasses4 min#059Fridge clear-outOpened too long? Out it goesBasicClasses Lists4 min#060Bus cardOnly ride if there's enoughBasicClasses Conditions5 min#061Train seatsHook on the carriagesBasicClasses Lists5 min#062Small car parkWhen it's full, no one gets inMini challengeClasses Lists7 minErrors When things go wrong0 / 8
#047Theme park ageNot a number? No crashStarterErrors3 min#048Share the cookiesNo kids? Don't divide by 0StarterErrors Numbers3 min#049Playlist trackNo such track? Return NoneStarterErrors Lists3 min#050Laundry billSkip what is not on the price listBasicErrors Dicts4 min#051Watch heart rateDrop the broken readings, keep the restBasicErrors Lists5 min#052Goals per gameNo games yet counts as 0.0BasicErrors Dicts5 min#053Lift keypadTypos and missing floors don't countBasicErrors Conditions5 min#054Pocket ledgerSkip the broken lines, add up the restMini challengeErrors Strings7 minRecursion A function that calls itself0 / 7
#063Rocket countdownLet the function count itself downStarterRecursion Lists3 min#064Backwards noteThe first letter goes lastStarterRecursion Strings3 min#065Boxes of sweetsBoxes inside boxesBasicRecursion Lists4 min#066Family generationsCount down from GranBasicRecursion Dicts5 min#067A crate of pencilsBoxes in the crate, packs in the boxBasicRecursion Numbers4 min#068Where are the keys?How many bags deepMini challengeRecursion Lists7 min#069Phone storageHow much a folder takes upMini challengeRecursion Dicts6 minMixed A few things together0 / 11
#070Pet weigh-inOne pet per line, into a dictStarterStrings Dicts3 min#071Juice bar ordersHow many cups of one juiceStarterComprehensions Lists3 min#072Airport arrivalsWhich flight lands firstBasicStrings Sorting5 min#073Spelling bee resultsTop score first, one line eachBasicComprehensions Sorting5 min#074Stationery stockAdd to it, or start a new lineBasicClasses Dicts5 min#075Birthday monthsHow many birthdays each monthBasicStrings Dicts4 min#076Trip spendingWhere did most of the money goBasicStrings Dicts5 min#077Weekend shoppingIngredients from a few recipesMini challengeDicts Sorting7 min#078Today's lessonsPick the day, sort by timeMini challengeStrings Sorting7 min#079Class book cornerWho has which bookMini challengeClasses Dicts7 min#080Arcade high scoresOnly each player's best gameMini challengeDicts Sorting8 minNothing matches. Try another filter.