Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Armstrong numbers between two intervals



Write a program to print all the Armstrong numbers in the given



range A to B (including A and B). An N -digit number is an Armstrong number if the number equals the sum of the Nth power of its digits.


Inputs:


10


15


Output:


-1

3. The More, The Lengthier

by CodeChum Admin


I think it's already a given that two sentences combined will always be longer than a single sentence alone, but to prove just how long two sentences can be, why don't we let our program show the combined length of the two randomly inputted strings?


Let's get it on!


Input


Two lines containing a string on each.


Python is fun

I love CodeChum


Output


A single line containing an integer.


28



Malayan Yellow Hut’s Pizza parlor has specialized systems that can identify how many slices that can be taken from a pizza of a given size. This system uses the following facts:


·      Each slice should have an area of 14.125 inches.

·      To calculate the number of slices, simply divide the area of the pizza by 14.125

·      The area of the pizza is calculated using the formula area = πr2.

 

Improve their systems by allowing it to identify how many pizzas should be ordered given a number of people expected to eat and the diameter of the pizza. Assume that each person is expected to eat an average of 4 slices.


Number Diamond




Given an integer N as input, write a program to print a number




diamond of 2*N-1 rows as shown below.




Note: There is a space after each number.

 Write a Python program to print the even numbers from a given list.

Sample List : [1, 2, 3, 4, 5, 6, 7, 8, 9]Expected Result : [2, 4, 6, 8]


 Write a Python program to display the first and last colors from the following list.

color_list = ["Red","Green","White" ,"Black"]


 Write a Python program which accepts a sequence of comma-separated numbers from user and generate a list and a tuple with those numbers.

Sample data : 3, 5, 7, 23Output :List : ['3', ' 5', ' 7', ' 23']Tuple : ('3', ' 5', ' 7', ' 23')


Lexicographic order

peter wants to arrange the words in ascending order of their length and later arrange the ones with the same length in lexicographic order. Each word is given in a serial number according to its position. Find the word according to the serial number


Word serial

 A  1

B  2

C  3

.. ..

X 24

Y 25

Z  26

AA 27

BB  28

... ..

BA  53

...  ...

ZZ  702

AA 703

.. ...

INPUT

The first line of input is a positive integer which is the serial number

OUTPUT

The output should be a single line containing the word that represents the serial number.

EXPLANATION

Given serial number is 42

As the serial number is between 26 and 52, the first character of the word is A. The remaining counter of the serial number is 16 (42-26)

The second character of the word is the 16th alphabet, which is P

So, the output should be AP

input

42

output

AP


input

751

output

ABW


Draw a flowchart and construct a python program to read the three subject’s marks secured by n students during FAT examination. If a student secured less than 50 in any subject, the student is failed in that subject. Count the number of students who failed in each subject and the total number of students who failed in at least one subject. 


Assume radius of earth: 6371 km

Round length of each line and final result to 2 decimal points

If co-ordinates are missing for any country use 0.000 N 0.000 E


Population limit: 61954

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.