Primes from 1 to n
Write a Python program to print all prime numbers from 1 to n. Step-by-step explanation, colour-coded code and real output.
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Write a Python program to print all prime numbers from 1 to n. Step-by-step explanation, colour-coded code and real output.
Write a Python program to check whether a number is prime using a loop. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate the factorial of a number using a loop. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find all the factors of a number. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate base raised to a power using a for loop. Step-by-step explanation, colour-coded code and real output.
Write a Python program that prints each digit of a number as a word. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find how often each digit appears in an integer. Step-by-step explanation, colour-coded code and real output.
Write a Python program to check whether a number is a palindrome using a loop. Step-by-step explanation, colour-coded code and real output.
Write a Python program to read a number and print its reverse. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate the product of the digits of a number. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate the sum of the digits of a number. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the sum of the first and last digits of a number. Step-by-step explanation, colour-coded code and real output.
Take free timed mock tests with answers and explanations.