Question
Write script to input 10 numbers and then display the smallest number entered. If the smallest number is an integer, then find the sum of its digits, otherwise display the message "smallest number is not an integer".

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

Write a program that reads a string and print and count the Upper case characters, Lower case characters and
other characters.
What kind of data gets stored in cookies and how is it useful?    
Write a Python program to draw a line chart with the suitable label in the x-axis, y-axis and a title. Value of X must be entered by the user as the list from the user and Y should be twice of X.
Write the python script to display all the records from the table student using for loop.   
Write the difference between Internet Banking and Mobile Banking?

Write SOL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii) which are based on the tables.

TABLE : CUSTOMERS

NO CNAME ADDRESS
101 Richa jain Delhi
101 Surbhi Sinha Chennai
103 Lisa Thomas Bangalore
104 Imran Ali Delhi
105 Roshan Singh Chennai

TABLE : TRANSACTION

TRNO CNO AMOUNT TYPE DOT
T001 101 1500 Credit 2017-11-23
T002 103 2000 Debit 2017-05-12
T003 102 3000 Credit 2017-06-10
T004 103 12000 Credit 2017-09-12
T004 101 1000 Debit 2017-09-05

(a) To display details of all transactions of TYPE Credit from Table TRANSACTION.
(b) To display the CNO and AMOUNT of all transactions done in the month September 2017 from the table TRANSACTION.
(c) To display the last date of transaction (DOT) from the table TRANSACTION for the customer having CNO as 103.
(d) To display all CNO,CNAME and DOT (date of transaction) of those CUSTOMERS from tables CUSTOMERS and TRANSACTION who have done transactions more than or equal to 2000.
(e) Select count(*), avg(amount) from transaction where dot>= ‘2017-06-01’;
(f) Select cno, count(*), max (amount) from transaction group by cno having count(*)> 1;
(g) Select cno, cname from customer where address not in (‘Delhi, ‘Bangalore’);
(h) Select distinct cno from transaction;

Write the python function delete() to delete the record In the student table according to the rollno passed as parameter.
Write the algorithm for the bubble sort.
Answer the following questions based on the given script/code.

(a) Name the variable used as parameter.
(b) Name the variable used as an argument
(c) Write function header statement.

(d) Which statement will return a value?
(e) Name a local variable(s).
(f) Name a global variable(s).
(g) Write function call statement.
(h) Variable 'a' will return the value to variable ______________.
(i) Name formal parameter

Write a script to create a list of 10 integers and then display all using loop.