Showing posts with the label PythonShow all

Raman is a former. He wants to buy some pipes of distinct sizes . There were N pipes in the shop and some of them are of same size. The size of the pipe has been marked on the pipe using some number nums in the form of bar code. Can you write a program that scans all the bar codes and print number of pipes Raman can get from that shop.

Raman is a former. He wants to buy some pipes of distinct sizes . There were N pipes in the shop and some of them are of same size. The size of the pipe h…

Read more

Find the Substring . Given s and x , determine the zero-based index of the first occurrence of x in s String s consists of lowercase letters in the range ascii(a-z) String x consists of lower case letters and may also contain a single wildcard character ‘*’ that represents any one character.

Find the substring Given s and x , determine the zero-based index of the first occurrence of x in s String s consists of lowercase letters in the ra…

Read more

You and your friend are at mobile exhibition held in your city . There are 26 companies presenting their mobiles at different stalls. Each company will be determined using a single letter using the alphabets from a to z. There might be more than one stall for some companies present at any positions. You have betted on the sequence of the stalls with your friend.

You and your friend are at mobile exhibition held in your city . There are 26 companies presenting their mobiles at different stalls. Each company will …

Read more

A Real Estate builder needs to construct a studio apartment. He wants the area of apartments to be a perfect square. To ensure this, he randomly selected 2 numbers and decided to find all the perfect squares among them(inclusive of the two numbers selected). He also wishes to find the sum of all the perfect squares selected, which will be used as area of the apartments.

A Real Estate builder needs to construct a studio apartment. He wants the area of apartments to be a perfect square. To ensure this, he randomly selecte…

Read more

An Online English grammar tutorial for kids has designed an assignment for its students . In the assessment a word will be displayed on the screen and the students must recreate that word by reversing each vowel in the word . The first vowel should be reversed with the last vowel, the second vowel with second last and so on. If it is not possible to reverse the vowel print the word as it is. A word is the concatenation of different characters tagged [a-z]or[A-Z] without any space present between any of characters.

An Online English grammar tutorial for kids has designed an assignment for its students . In the assessment a word will be displayed on the screen and the…

Read more