Questions: Writing code
New numbers every time.
Writing functions
- A function that returns a valueWrite, 2 marks, Plus
- A function using DIV and MODWrite, 2 marks, Plus
- Largest or smallest of threeWrite, 3 marks, Plus
- A function with selectionWrite, 3 marks, Plus
- A function with a loopWrite, 3 marks, Plus
- Pseudocode into PythonWrite, 4 marks, Plus
- A function on factorsWrite, 4 marks, Plus
- Two functions, one calling the otherWrite, 5 marks, Plus
Validation and authentication
- A range checkWrite, 2 marks, Plus
- A length checkWrite, 2 marks, Plus
- A format checkWrite, 4 marks, Plus
- Validate input in a loopWrite, 4 marks, Plus
- An authentication routineWrite, 5 marks, Plus
- A password strength checkWrite, 4 marks, Plus
- Check a login against stored listsWrite, 3 marks, Plus
- A type check on textWrite, 3 marks, Plus
String handling
- Initials from a nameWrite, 2 marks, Plus
- Count characters in a stringWrite, 3 marks, Plus
- Reverse a string or test a palindromeWrite, 3 marks, Plus
- A Caesar cipher with ord and chrWrite, 5 marks, Plus
- Build a usernameWrite, 3 marks, Plus
- Slice the ends of a stringWrite, 2 marks, Plus
- A character-code algorithm from pseudocodeWrite, 3 marks, Plus
- Work through the words in a sentenceWrite, 4 marks, Plus
Lists and 2D lists
- Total or mean of a listWrite, 2 marks, Plus
- Largest or smallest in a listWrite, 3 marks, Plus
- A linear searchWrite, 3 marks, Plus
- Count items meeting a conditionWrite, 3 marks, Plus
- Total a row or column of a 2D listWrite, 3 marks, Plus
- Compare the columns or rows of a 2D listWrite, 4 marks, Plus
- Search a 2D gridWrite, 4 marks, Plus
- Parallel listsWrite, 4 marks, Plus
Records and files
- Read one field from a recordWrite, 2 marks, Plus
- Total from recordsWrite, 4 marks, Plus
- Select recordsWrite, 3 marks, Plus
- The best record in a fileWrite, 4 marks, Plus
- Records ready to write to a fileWrite, 3 marks, Plus
- Read records until a rogue valueWrite, 4 marks, Plus
- Update a recordWrite, 5 marks, Plus
- Complete and refine a program (6 marks)Write, 6 marks, Plus
AQA, Pearson Edexcel and OCR are registered trade marks of their owners. Brainlag Learn is independent: it is not affiliated with or endorsed by any exam board, and every question on it is original.