Python Algorithms Online Test

TestDome skill assessments are used by more than 6,000 companies and 450,000 individual test takers.

Jobseekers: Get a Certificate

Take a Practice Test

Companies: Try First, Pay Later

Sign Up To Use This Test

The Python Algorithms online test assesses candidates' algorithmic-thinking skills and their ability to implement algorithms using Python.

It's an ideal test for pre-employment screening. A good developer will be able to design and implement algorithms that are both correct and efficient. Computational complexity is important not only when scaling applications but when creating responsive, maintainable, and efficient code.

This online test requires candidates to analyze or design an algorithm using Python as the programming language.

Recommended Job Roles
Back-End Developer
Data Analyst
Python Developer
Web Developer
Sample Candidate Report

Sample Free Questions

File Owners

10min
  -  
Easy  
  -  
CODE

Python Dictionary Public

Implement a group_by_owners function that:

  • Accepts a dictionary containing the file owner name for each file name.
  • Returns a dictionary containing a list of file names for each owner name, in any order.

For example, for dictionary {'Input.txt': 'Randy', 'Code.py': 'Stan', 'Output.txt': 'Randy'} the group_by_owners function should return {'Randy': ['Input.txt', 'Output.txt'], 'Stan': ['Code.py']}.

Ice Cream Machine

10min
  -  
Easy  
  -  
CODE

Python Iteration Lists Public

Implement the IceCreamMachine's scoops method so that it returns all combinations of one ingredient and one topping. If there are no ingredients or toppings, the method should return an empty list.

For example, IceCreamMachine(["vanilla", "chocolate"], ["chocolate sauce"]).scoops() should return [['vanilla', 'chocolate sauce'], ['chocolate', 'chocolate sauce']].

Binary Search Tree

15min
  -  
Easy  
  -  
CODE

Python Algorithmic thinking Recursion Tree Public

A three-node binary tree.Binary search tree (BST) is a binary tree where the value of each node is larger or equal to the values in all the nodes in that node's left subtree and is smaller than the values in all the nodes in that node's right subtree.

Write a function that, efficiently with respect to time used, checks if a given binary search tree contains a given value.

For example, for the following tree:

  • n1 (Value: 1, Left: null, Right: null)
  • n2 (Value: 2, Left: n1, Right: n3)
  • n3 (Value: 3, Left: null, Right: null)

Call to contains(n2, 3) should return True since a tree with root at n2 contains number 3.

Use Free Questions On a Trial Plan

Premium Questions

The premium question library contains our unique, hand-crafted questions. We offer a refund if you find any of them answered online.

Questions
Book Sale, Moving Total, Unique Product, Internal Nodes, Paper Strip, Veterinarian, Unique Numbers, Max Sum
Skills
Python Algorithmic thinking Dictionary Sorting Set Lists Tree Queue
Score Distribution
# of candidates
0-33%
34-66%
67-100%
Score
Pricing For Premium Questions