Challenges

Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Algorithms Math Parsing

Before the name change in the year 2022, Toronto Metropolitan University was known as Ryerson University. Given the percentage grade, calculate and...

Read more
Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Data Structures Algorithms Sequences

Determine whether the sequence of items is strictly ascending so that each element is strictly larger (not just merely equal to) than the...

Read more
Created: Sep 08, 2024
Difficulty: Hard
Type: Text
Tags: Algorithms Simulation Sequences

Given a list of items whose length is guaranteed to be even (note that “oddly” enough, zero is an even number), create and return a list produced by p...

Read more
Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Algorithms Math Number Theory Pattern Matching

Check that the given positive integer n contains only odd digits (1, 3, 5, 7 and 9) when it is written out. Return True if this is the case, and `Fa...

Read more
Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Algorithms Math Number Theory Pattern Matching

A nonnegative integer is said to be a cyclops number if it consists of an odd number of digits so that the middle (more poetically, the “eye”) digit i...

Read more
Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Data Structures Algorithms Combinatorics Simulation

A single domino tile is represented as a two-tuple of its pip values, such as (2,5) or (6,6). This function should determine whether the given list of...

Read more
Created: Sep 08, 2024
Difficulty: Medium
Type: Text
Tags: Algorithms Math Combinatorics Simulation

This problem was inspired by the Mathologer video “Secret of Row 10”. To start, assume the existence of three values called “red”, “yellow” and “blu...

Read more
Created: Sep 08, 2024
Difficulty: Medium
Type: Text
Tags: Data Structures Algorithms Optimization Loops

An element in a list of items is a dominator if every element to its right (not just the one element immediately to its right, but all of them) is...

Read more
Created: Sep 08, 2024
Difficulty: Easy
Type: Text
Tags: Data Structures Algorithms Sequences Optimization

Given a string of digits guaranteed to only contain ordinary integer digit characters 0 to 9, create and return the list of increasing integers acquir...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a parameter and returns the type of the variable as a string. The function should accept one parameter and return a string...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Math Basics

Write a function that takes two parameters: a value and a type to cast to. The function should cast the input value to the specified type and return t...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Math Basics

Write a function that takes an integer and returns "Even" if the number is even, or "Odd" if the number is odd. This problem is `designed to help...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Math Basics

Write a function that takes two numbers and returns a string indicating their comparison result. The function should accept two parameters and return:...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: String Manipulation Basics

Write a function that takes a string and a position (index) and returns the character at that position in the string. This problem is `designed to hel...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: String Manipulation Basics

Write a function that takes a string and returns the string reversed. This problem is designed to help you practice string manipulation and slicing....

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: String Manipulation Basics

Write a function that takes two strings and returns True if the second string is a substring of the first string, or False otherwise. This problem...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: String Manipulation Basics

Write a function that takes two strings and returns a new string that is the concatenation of the two input strings. This problem is `designed to help...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: String Manipulation Basics

Write a function that takes a context string and a value, and returns a formatted string combining both. This problem is `designed to help you practic...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes a list of numbers and returns the sum of all the elements. This problem is `designed to help you practice working with lis...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes a list of numbers and returns the largest element. This problem is `designed to help you practice working with lists and f...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes a list and returns a new list with the elements in reverse order. This problem is `designed to help you practice working w...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures

Write a function that takes a list of numbers and returns a new list with the elements sorted in ascending order. This problem is `designed to help yo...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes a list and a value, and returns a new list with all occurrences of the specified value removed. This problem is `designed...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes two lists and returns a new list that is the concatenation of the two input lists. This problem is `designed to help you p...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Data Structures Basics

Write a function that takes a list and a value, and returns True if the value is in the list, or False otherwise. This problem is `designed to hel...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a dictionary and a key, and returns the value associated with the key. This problem is `designed to help you practice acce...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a dictionary, a key, and a value, and returns a new dictionary with the key-value pair added. This problem is `designed to...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a dictionary and a key, and returns a new dictionary with the specified key removed. This problem is `designed to help you...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Loops Basics

Write a function that takes a positive integer N and returns a list of numbers from N down to 1. This problem is `designed to help you practice loopin...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Loops Basics

Write a function that takes a start number, an end number, and a step size, and returns a list of numbers starting from the start number up to but not...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Loops Basics

Write a function that takes two integers, start and end, and returns a list of all even numbers between start and end (inclusive). This problem is `de...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Loops Basics

Write a function that takes a positive integer N and returns its factorial calculated using a for loop. This problem is `designed to help you practice...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a positive integer N and returns the sum of all numbers from 1 to N using a while loop. This problem is `designed to help...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a positive integer N and returns its reverse using a while loop. This problem is `designed to help you practice using whil...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a positive integer N and returns a list containing the Fibonacci sequence up to N terms using a while loop. This problem i...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a positive integer N and returns the number of digits it contains using a while loop. This problem is `designed to help yo...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two integers: start and an end (interval definition, exclusive) and returns all identified prime numbers in a list...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two parameters: a list of integers and an integer exponent. The objective is to return a list of integers where each...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Math Basics

Implement a primitive calculator that accepts some operation code with two parameters operand1 and operand2 . This problem is `designed to help...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a list of words and identifies which words are palindromes. This problem is `designed to help you practice creating and ca...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a birthdate as a string in the format "YYYY-MM-DD" and returns the age in years as an integer. This problem is `designed t...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a date string in the format "YYYY-MM-DD" and an integer number of days to add. The function should return a new date strin...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two date strings in the format "YYYY-MM-DD" and returns the number of days between them as an integer. This problem is `de...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a time string in the format "HH:MM:SS" and returns it in 12-hour format with AM/PM. This problem is `designed to help you...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a year as an integer and returns True if it is a leap year, or False otherwise. This problem is `designed to help you...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two numbers and returns the minimum of the two using built-in functions. This problem is `designed to help you practice us...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two numbers and returns the maximum of the two using built-in functions. This problem is `designed to help you practice us...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes two numbers, base and exponent, and returns the result of raising the base to the power of the exponent using built-in fun...

Read more
Created: Sep 14, 2024
Difficulty: Beginner
Type: Text
Tags: Basics

Write a function that takes a number and returns its absolute value using built-in functions. This problem is `designed to help you practice using bui...

Read more