given two strings write a program to determine if a string s2 is a rotation of another string s1 in python in easy method
given a integer valun N as input, write a program to print a shaded diamond of 2*N-1 rows using astherisk(*) character..
write a program to implement reversal of a string using stack data structure
Let A be an array of size n. Choose the first value as pivot. Write a program to partition the array based on the pivot value so that all values to
the left of pivot are lesser and right of pivot are greater than the pivot.For example, if A = [60, 67, 34, 23, 32, 54, 76] is the input, the output has to be A =[23, 54, 34, 32, 60, 67, 76]. Since 60 is the pivot, left of 60 are lesser than 60 and the right values are greater than 60
write a program in Python to store the name of five cities list create a function search name to search city using Linear search if the required name was and name it is not available the function should return -1
Survival of the Biggest
by CodeChum Admin
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Input a non-zero positive integer.
Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.
Input
A line containing an integer.
214
Output
A line containing an integer.
4
In or Out
by CodeChum Admin
I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?
Now let's get this game started.
Input
A line containing an integer.
35
Output
A line containing a string.
Out
In or Out
by CodeChum Admin
I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?
Now let's get this game started.
Input
A line containing an integer.
35
Output
A line containing a string.
Write a class which consists of four data members and four member function sum min max and factorial you can inilized class object or can be take by an function
List down the difference between configuring static address and dynamic address?