Odd and even keys
Write a Python program to get lists of the items with even keys and with odd keys. 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 get lists of the items with even keys and with odd keys. Step-by-step explanation, colour-coded code and real output.
Write a Python program to concatenate two dictionaries. Step-by-step explanation, colour-coded code and real output.
Write a Python program to move all items from dict1 to dict2, leaving dict1 empty. Step-by-step explanation, colour-coded code and real output.
Write a Python program to print the square of every value in a dictionary. Step-by-step explanation, colour-coded code and real output.
Write a Python program to add elements to a dictionary. Step-by-step explanation, colour-coded code and real output.
106 Python string programs with solutions: reverse, palindrome, vowels, duplicates, word counts, replace, split and join, each explained line by line.
Write a Python program to perform all the basic arithmetic operations on two numbers. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate the volume of a sphere. Volume = 4/3 × π × r³. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the square root of a number using the math library. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the LCM (lowest common multiple) of two numbers. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the HCF (highest common factor, also called GCD) of two numbers. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the sum of the first n natural numbers (1 + 2 + ... + n). Step-by-step explanation, colour-coded code and real output.
Take free timed mock tests with answers and explanations.