Code Editor

Quantum Quest Resources

Problems

Write a Python function named factorial that takes an integer n and returns the factorial of n. The factorial of a non-negative integer n is the product of all positive integers less than or equal to n. For example, the factorial of 5 is 5 * 4 * 3 * 2 * 1 = 120. If n is 0, the factorial is 1.

Create a function to check if a given string is a palindrome. A palindrome is a word that reads the same backward as forward.

Implement a function to perform a linear search on an array. The function should return the index of the element if found, otherwise -1.

Write a program to reverse a given string. The function should return the reversed string.

Create a function to calculate the sum of all elements in an array. The function should return the sum.

Write a function to check if a given number is even or odd. The function should return true if the number is even and false if it's odd.

Write a program to find the largest element in a given array. The function should return the largest element.

Create a function to convert a given temperature from Celsius to Fahrenheit. The function should return the temperature in Fahrenheit.

Write a function to print the Fibonacci series up to a given number. The function should return the series as a string.

Create a function to check if a given number is prime. The function should return true if the number is prime and false otherwise.

Click "Run Code" to see the output here