Python Answers

Questions answered by Experts: 5 288

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

Write a program in Python which allows you to insert at the 3rd position of an existing file called my File.txt, the line "This line was inserted via Python code! " without changing the existing content


file.


Function to count number of lines from a text files


Assume a text file “coordinate.txt” is already created. Using this file create a PYTHON function to count the number of words having first character capital.


Write a function TRANSFER( ) in PYTHON, that would copy all those records which are having area code as “DEL” from PHONE file to PHONBACK file.


Write a function in PYTHON to add new record at the bottom of a file “STUDENT”


Assume a text file “Test.txt” is already created. Using this file, write a function to create three

files “LOWER.TXT” which contains all the lowercase vowels and “UPPER.TXT” which contains all 

the uppercase vowels and “DIGIT.TXT” which contains all digits


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


LATEST TUTORIALS
APPROVED BY CLIENTS