Write a Python code to find price column value between 30000 to 70000 and print the id and product columns of the last three rows from the products.csv file.Download the products.csv file here.Result for price column value between 30000 to 70000 and id and product columns last three rows are − ... Read More
Write a Python program to read data from the products.csv file and print the number of rows and columns. Then print the ‘product’ column value matches ‘Car’ for first ten rowsAssume, you have ‘products.csv’ file and the result for number of rows and columns and ‘product’ column value matches ‘Car’ ... Read More
We are required to write a JavaScript function that takes in a string as the first and the only argument.The task of our function is to check whether we can make that string a palindrome string by deleting at most one character from the string. If we can do so, ... Read More
For the purpose of this question, we define a sentence as a string that contains English alphabets and punctuations and a word is a substring of that sentence joined together by whitespaces.We are required to write a JavaScript function that takes in a sentence string, str, as the first argument ... Read More
We are required to write a JavaScript function that takes in an array of numbers, arr, as the first argument and a number, num, as the second argument.The function should determine whether there exists a way of distributing the elements of the array arr into num groups such that all ... Read More
Palindrome Sequence:A string sequence is known as palindrome sequence if it reads the same from front and the back. For instance, 'aba', 'madam, 'did' are all valid palindrome sequences.We are required to write a JavaScript function that takes in a string as the first and the only argument. The string ... Read More
Suppose we are given an array of sorted characters letters containing only lowercase letters. And given a target letter target.We are required to write a JavaScript function that takes in the array as the first argument and the letter as the second. The function is supposed to find the smallest ... Read More
Word Square:A word square consists of a set of words written out in a square grid, such that the same words can be read both horizontally and vertically.For instance, once valid word square is −H E A R T E M B E R A B U S E R ... Read More
In the number system, the Greatest Common Divisor (GCD) of two numbers is that greatest number which divides both the numbers. Similarly, if we apply this concept to strings, the gcd of two strings is the greatest substring (greatest in length) that is present in both the strings.For example −If ... Read More
We are required to write a JavaScript function that takes in an array of numbers as the first and the only argument. The function should first pick the smallest number from the array and then calculate the sum of all the digits of the number.If the digit sum of that ... Read More