| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Assume that an ArrayList of integers named a has been declared and initialized.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Assume that an ArrayList of integers named a has been declared and initialized.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
The superclass, EducationalInstitution, contains:
an int instance variable, duration, indicating the standard number of years spent at the institution
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: As an artistic student, with entrepreneurial interests, you decide to make a musical product. Your product is a simple software powered Jukebox, which will play a tune.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: Jack Stealer has been suppressing his income from the Feds to save taxes.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Below is a program that takes an integer as input.
Write a for loop which prints a countdown from that number till 1
eg: if the inputted number is 4, then output should be:
4
3
2
1
Notes:
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You are stranded in the Amazon rain forests with a robot who calls himself FizzBuzz.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: We recently came across a very interesting thread on Reddit IAmA , which describes how a 24 year old boy conquered social anxiety. He describes how his therapist used a system called SUDS.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which takes integer number and prints the table of that number.
Example :
1.If user gives input 2 then output table should be in the below format :
2
4
6
8
10
12
14
16
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which takes an input string and capitalizes only the first character of each word in the string, and does not affect the others.
Examples:
| Language: | Java |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Complete the following program such that it prints numbers in triangular format as shown:
Eg:
Enter the size:4
Triangle is:
1
22
333
4444
Enter the size:6
Triangle is:
1
22
| Language: | Java |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Complete the below program such that it prints all even numbers upto the given size.
Ex: if user inputs 7, output should be:
0
2
4
6
Ex: if user inputs 14, output should be:
0
2
4
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: When this exercise is run, the program will ask the user to enter a number.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:15:00 |
Write a program which takes input as string and also takes one character input and finds out the number of occurrence of the given character in string.
Example:
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
GCD of two numbers is Greatest Common Divisor for that numbers.
consider GCD for 12 and 24.
factors for 24 are 2,2,2,3
factors for 12 are 2,2,3
| Language: | Java |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program to take input integer from the user and check out the entered number is Armstrong or not.
For e.g. :
1.If user gives input 153 then the output will be :
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: When the exercise below is run, it will ask you to enter a String. The String that was entered, will be given to you in a variable called 'word'.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Write a class named Averager containing:
An instance variable named sum of type integer, initialized to 0.
An instance variable named count of type integer, initialized to 0.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: Along with being a magician, you have also taught yourself the art of trickery by watching open courseware videos on Trickery 101.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You are at a party where Jake and Mike got a box full of beer cans for everyone.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:15:00 |
Write a program which takes a string and a character as inputs and remove the character from the string.
For Example :
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
An ISBN number is legal if it consists of 10 digits and
d_1 + 2*d_2 + 3*d_3 + ... + 10*d_10 is a multiple of 11.
The ISBN number 0-201-31452-5 is valid.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which accepts an integer n and calculates sum, product and average from 1 to 1/n i.e. n's reciprocals
for ex.
1) If user input 3.
then its sum from 1 to 1/3 = 1.803
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program to display all possible permutations of a given input string
if the string contains duplicate characters, you may have multiple repeated results.
For Ex :
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem:
One Friday evening after a tiring week of cranking out code, you decide to play tailless with your colleagues.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You have developed a pot belly with all the free beer your friends have been treating you, for the excellent Jukebox software.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You recently decided to quit your 9:00 AM to 11:00 PM job, and become a freelance developer.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: A friend of yours is in the habit of using very big words. They constantly use words like gasconading, luminescent, and sesquipedalian, in their normal conversation.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which takes input as integer and display the triangle of 0's and 1's on the basis of input integer.
Example:
1.If user gives input 5 then the triangle should be :
1
01
010
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Complete the following program which takes the number as input and print the Sequences of numbers in triangular format up to that given height.
A program scenario is given below:
Example1:<
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which takes input binary number and convert this number in to decimal format.
For e.g:
1.If user gives input 101010 then the output should be 42.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
The duration between March 20 (inclusive) and June 20 (inclusive) is Spring time.
Write a program which takes month and day as positive integer input.
and shows whether its a spring time or not.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
A very easy challenge.
Write a program which accepts 3 integers and sort them in ascending order.
For ex :
1) if user input 39 26 28 then output will be 26 28 39.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which accepts an integer and print its factors but the factors must be prime.
For ex :
1) if user inputs integer 369.
it should print 3 3 41 as prime factors.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Complete the following program to find whether given number is perfect or not
Help(Perfect number is a positive number which sum of all positive divisors
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Complete the following program to convert decimal number into binary form. Program will take input number from user and will display its binary equivalent.
Scenario should be same like given below
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Given you have a class AutoFactory with two static methods called shutdown and reset.
Neither method has any parameters. The shutdown method may throw a ProductionInProgressException.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Declare and initialize an ArrayList named denominations that contains 3 elements of type of Integer .
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem:
In this exercise, we have created a variable of type Map, called 'worldCapitals'. It contains the names of countries as keys and their corresponding capital as the value.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Given the existence of a Phone class.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: A good conversationalist is not someone who talks a lot, rather it’s someone who gets the other person to talk.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: Your Jukebox software has started becoming really popular. Being a firm believer in free and open source software, you share your code with all your friends.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: After taking a few programming courses at the university, you apply for a summer internship at a local software company.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Online Book Depot offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with every purchase of 8 or more books.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
A mathematician named Ulam proposed generating a sequence of numbers from any positive integer n (n > 0) is as follows:
If n is 1, stop.
If n is even, the next number is n/2.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Gray Code is a modified binary code in which sequential numbers are represented by expressions that differ only in one bit, to minimize errors.
| Language: | Java |
| Difficulty Level: | Medium |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which accepts cartesian coordinates x and y, and prints its polar coordinates form i.e. r and theta (degrees only).
For ex :
| Language: | Java |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program which takes input as string and then implement the logic to findout Uppercase Consonants,Lowercase Consonants,Uppercase Vowels,Lowercase Vowels in string.
Example :
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
Write a program to implement a code for making reverse Flyod's triangle using loops. Floyd's Triangle: It is a pattern of numbers arranging in below format :
7_8_9_10_
4_5_6_
2_3_
| Language: | Java |
| Difficulty Level: | Hard |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 1:00:00 |
Complete the following program which takes input as a number and converts that number in to
Indian rupees format as given below in the examples.
| Language: | Java |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Time limit: | 0:30:00 |
While loop test:
Complete the program to display the numbers in reverse order from n till 1.
Ex:
if user input is 5
then output should be:
5
4
3
2
1
if user input is 7
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You enjoy reading out stories and rhymes to your daughter every night. However, this weekend you have to travel for a meeting, and you will be unable to read her a story.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
In this exercise, you have to add type information to List and ArrayList, so they are constrained to only hold String objects. The logic of the exercise has already been implemented.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You watch a movie, which turns out to be a slapstick comedy, where the the lead character would repeat the line "and so be it", after everything he spoke.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
In this exercise, you have to add type (generic) information to the Map while creating it.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem:
In this exercise, we have created a variable of type Map, called 'worldCapitals'. It contains the names of countries as keys and their corresponding capital as the value.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem:
In this exercise, we will not spin any yarns. We will give you a list of String items, and you have to sort the List.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
In this exercise, we have created a class PersonComparator, which is an inner class of DifferentComparison.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
In this exercise, you have to implement the compareTo method of the Person class, such that Person objects get compared based on their 'name' attribute.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You recently read a blog post about the merits of using short sentences while writing. The article inspires you to write a program which will print the number of words in a sentence.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Write a class definition for an abstract class, Vehicle, that contains:
a double instance variable, maxSpeed
a protected double instance variable, currentSpeed
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: It is said that the ability of bringing people together for a good cause is almost divine.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
A String variable, fullName, contains a name in one of two formats:
last name, first name (comma followed by a blank), or
first name last name (single blank)
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You get drunk on a weekend, and forget your girlfriend’s birthday. She is so angry, that she makes you attend a party frequented by investment bankers.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You often enjoy dining at a Chinese restaurant near your house. Along with good food you also enjoy chatting with the manager, who always has interesting stories to tell.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: Your peers think you are a magician. They think you can conjure arrays out of thin air. In the program below, you are given a variable called 'nums' which is of type array of integers.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: Mary usually stuffs her purse with plenty of $10 bills when she leaves her house. Once she reaches the market, she continues buying $10 items, until she runs out of money.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: When this exercise is run, the program will ask the user to enter a number.
| Language: | Java |
| Difficulty Level: | Easy |
| Questions: | 1 |
| Attempts allowed: | Unlimited |
| Available: | Always |
| Pass rate: | 75 % |
| Time limit: | 0:30:00 |
Problem: You are walking with your girlfriend in the woods on a nice balmy April evening, and suddenly you see a bunch of rabbits. Look! you exclaim, so many rabbits.