Question
Write a python program using function to check whether a number is Armstrong or not. The function will accept a number as parameter.

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

WAP to generate 2n+1 lines of the following pattern on the computer screen:

Write a script to create a list of 10 random integers. Create two more lists –one containing even elements from the original list, and the other containing odd elements from the original list. Use append() method to create first list and concatenation operator to create the second. Then display all the three lists.

Based on the given dataset answer the questions given below:

From_To FlightNumber RecentDelays Airline
0 NewDelhi_Chennai 10045.0 [23, 47] Spicejet
1 Mumbai_NewDelhi NaN [] Indigo
2 Jaipur_Jammu 10065.0 [24, 43, 87] Spicejet
3 Chennai_Lucknow NaN [13] Indian Airlines
4 Mumnbai_Chennai 10085.0 [67, 32] Spicejet

(i) #To display the maximum flight number

(ii) #To print the number of flights airline wise

(iii) #to drop the nan values from the dataframe

(iv) To fill nan with blank values

(v) To print the maximum values of recent delays

(vi) To print the median of all the numeric values.

(vii) To print the sum of the recentdelays

(viii) To count the flight numbers.

(ix) To print the airline wise the sum of the recentdelays along with From_to as column

(x) To print the airline wise the sum of the recentdelays along with From_to as column. Also fill NaN values as blank.

WAP to find the sum of first n terms of the following series:
$1-\frac{x^3}{3 !}+\frac{x^5}{5 !}-\frac{x^7}{7 !} \ldots$
Write a python program using function to print the sum of first n natural numbers. 

Write a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically.
Suppose the following input is supplied to the program:
hi,we,are,learning
Then, the output should be:
are,hi,learning,we

WAP to find the sum of first n terms of the following series:
$x+x^2+x^3+\ldots$

Consider the following tables Product and Client. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii)

TABLE: PRODUCT

P_ID Product Name Manufacturer Price
TP01 Talcom Powder LAK 40
FW05 FaceWash ABC 45
BS01 Bath Soap ABC 55
SH06 Shampoo XYZ 120
FW12 Face Wash XYZ 95

TABLE: CLIENT

C_ID ClientName City P_ID
01 Cosmetic Shop Delhi FW05
06 Total Health Mumbai BS01
12 Live Life Delhi SH06
15 Pretty Woman Delhi FW12
16 Dreams Bangalore TP01

(i) To display the details of those Clients whose City is Delhi

(ii) To display the details of Products whose Price is in the range of 50 to 100 (Both values included)

(iii) To display the ClientName, City from Table Client, and ProductName and Price from table Product, with their corresponding matching P_ID

(iv) To increase the Price of all Products by 10

(v) SELECT DISTINCT CITY FROM Client;

(vi) SELECT Manufacturer, MAX(Price), Min(Price), Count(*) FROM Product GROUP BY Manufacturer;

(vii) SELECT ClientName, ManufacturerName FROM Product, Client WHERE Client.Prod_Id = Product.P_Id;

Write a python program using function to create the list of numeric values and search the number in the list using Linear Search Technique. The function will return –1 if element not found otherwise show the position.
Write the different types of plagiarism.