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

Write a function in python to search for details (Phone no and Calls) of those Phones which have more than 800 calls from file "phones".


Given two strings(S1 and S2), write a program to determine if a string S2 is a rotation of another string S1.


Given two integers (M and N), write a program to print the first perfect square in a given range.


3-digit Armstrong Number

Write a program to check if a given 3-digit number

X is an Armstrong number or not.Note: A number is an Armstrong number if the number is equal to the sum of the Nth power of its digits.Input

The first line is an integer

X.Output

The output should be a single line containing

True if it satisfies the given conditions, False in all other cases.Explanation

In the given example

X = 371, The number of digits in 371 is 3. So, 33 + 73 + 13 = 371. Hence,

371 is an Armstrong number.So, the output should be

True


Uncommon Number

Given a number

N, find whether the number is common or uncommon. A number is considered uncommon if it is not divisible by any of the single-digit primes.Input

The first line of input is an integer

N.Output

The output should be a single line containing

True if it satisfies the given conditions, False in all other cases.Explanation

In the given example,

N = 5633 the number is not divisible by 2, 3, 5, 7. So, the number is an uncommon number.Therefore, the output should be

True.


Eligibility Criteria - 4

Given a student has scored

M marks in Maths, P marks in Physics and C marks in Chemistry. Write a program to check if a student is eligible for admission in a professional course. If any one of the below conditions is satisfied then the student is eligible.1) M >= 60, P >= 50, C >= 45 and M + P + C >= 180.

2) Total in M and P >= 120 or Total in C and P >= 110.

Input

The first line is an integer

M The second line is an integer P The third line is an integer COutput

The output should be a single line containing

True if it satisfies the given conditions, False in all other cases.Explanation

Given

M = 72, P = 65, C = 51, the scores of this student satisfies the first condition


M >= 60, (72 >= 60)

P >= 50 (65 >= 50)

C >= 45 (51 >= 45)

M + P + C >= 180 (72 + 65 + 51 >= 180)

 


So, the student is eligible.


Eligibility Criteria - 3

Given a student has scored M marks in Maths, P marks in Physics and C marks in Chemistry. Write a program to check if a student is eligible for admission in a professional course based on the following criteria:


M >= 35, P >= 35, C >= 35 and total in any of the two subjects >= 90.


Input

The first line is an integer M, the second line is an integer P and the third line is an integer C.


Output

The output should be a single line containing True if it satisfies the given conditions, False in all other cases.


Explanation

Given M = 50, P = 35, C = 40


So, the output should be True


 # Method: Write levelsList to levelsFile (override the existing file)

    def writeLevelsToFile(self):

 # Open the file in a way that will override the existing file (if it already exists)

  # Use a loop to iterate over levelsList item by item

 # Convert everything in the item to a string and then add \n to it - before writing it to the file

# Close the file

# Method: Load levelsList using the data in levelsFile 

def readLevelsFromFile(self):

try:

 # Set levelsList to an empty list 

 # Open the file

 # Use a loop to read through the file line by line

  # If the last two characters in the line is "\n", remove them

# Append the line to levelsList

 # Close the file

 except:

return

Diamond Crystal

Given an integer value 

N, write a program to print a diamond pattern of 2*N rows as shown below.

Input

The first line of input is an integer 

N.

Explanation

In the given example, the number of rows in the diamond is 

2*5 = 10.

So, the output should be

    /\
   /  \
  /    \
 /      \
/        \
\        /
 \      /
  \    /
   \  / 
    \/
Sample Input 1
5
Sample Output 1
    /\
   /  \
  /    \
 /      \
/        \
\        /
 \      /
  \    /
   \  /
    \/
Sample Input 2
3
Sample Output 2
  /\
 /  \
/    \
\    /
 \  /
  \/

please provide the correct output.
LATEST TUTORIALS
APPROVED BY CLIENTS