Quiz
Python Basics Quiz
…Arithmetic: // , % , ** and operator precedence Strings: indexing, slicing and string methods Conditions: if , elif , else and truthy values Lists, tuples, dictionaries and sets Loops with range()…
Showing 31–40 of 41
Quiz
…Arithmetic: // , % , ** and operator precedence Strings: indexing, slicing and string methods Conditions: if , elif , else and truthy values Lists, tuples, dictionaries and sets Loops with range()…
Article Python Fundamentals
…results. Always use different names. Mistake 2: Wrong Indentation # Where should this print go? for y in range(3): for x in range(3): print(f"({x}, {y})", end=" ") print() # ← This executes after each…
Challenge
…rejected and the alerts list, written with json.dump() , indent=2 and ensure_ascii=False . Then print one last line: Saved summary.json The hidden tests open summary.json and compare it with what they…
Challenge
…find out why, then fix it in a way that keeps the function independent of the rest of the program. Predict and run Don't run the code yet. Read it and decide what it will print. Write your guess in…
Challenge
…whole response. After the three lines, print every field, indented by two spaces, in the order the response has them: Launch: Lumen-3 Provider: JAXA Status: Go All fields: id…
Challenge
…or starts with # . Stripping first matters: one comment is indented, and a line can hold nothing but spaces. Damaged lines A reading arrived cut off: 2026-03-14T09:30:10Z,TANK-1 has only two fields…
Challenge
…= 412.5 with for temperature_c in temperatures_c: , then indent the whole check and the print under it, so they run once for each temperature. A summary line After the list, print a summary: how many…
Challenge
…else for OK. "From 400" includes 400 itself, so use >= . Indent each branch's line by four spaces. A status line The console shows the sensor, the reading and the level on one line. Add sensor =…
Challenge
…and move the existing chain and its print into the else , indented by four more spaces. Don't use if not temperature_c : 0 °C is a real reading. An empty field Readings now come from the telemetry…
Quiz
…loop enumerate() and range(len()) when you need positions Indentation inside the loop, break and a first nested loop How it works 15 questions: 11 with one correct answer, 4 where you select every…