xi- comp sci - welcome to kendriya vidyalaya no. - 2 ... comp sci write a menu driven program to...

15
XI- COMP SCI 1 Write a menu driven program to perform the following operations, . 1. To find out the sum of digits of any number. 2. To count the total even digits in number. 2. Write a menu driven program to perform the following operations, using function. 1.To check that given number is prime or not. 2. To check the number is odd or not. 3. Write a menu driven program to perform the following operations using functions.(pass a integer argument to function) 1. Find sum of squares of a digit of a number (For eg. If user inputs 123 then sum should be 1+4+9=14.) 2. Find the reverse of a number and print in main function. 4. Write a menu driven program to perform the following operations using sing function 1.To find the sum of cubes of odd digit of number.(For eg. If number 123 then sum of cubes of odd digit be 1+27=28) 2.Check the number is palindrome or not. 5. Write a menu driven program to perform the following operations using function. 1.To print odd numbers upto n in descending order. 2.To calculate the multiplication of all digit(For eg. If n is 345 then multiplication of digits will be 3*4*5=60 6. Write a menu driven program to display the following series using function. 1. 1, -4, 7, -10 ……n 2. 10 11 11 12 12 12 13 13 13 13 14 14 14 14 14 7. Write a menu driven program to perform the following operations ,using function(pass N as integer argument)

Upload: doanquynh

Post on 24-May-2018

233 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

XI- COMP SCI

1 Write a menu driven program to perform the following operations,ppppppppppppppppppppppppppppppppppp.

1. To find out the sum of digits of any number. 2. To count the total even digits in number.

2. Write a menu driven program to perform the following operations, using function.

1.To check that given number is prime or not.

2. To check the number is odd or not.

3. Write a menu driven program to perform the following operations using functions.(pass a integer argument to function)

1. Find sum of squares of a digit of a number (For eg. If user inputs 123 then sum should be 1+4+9=14.) 2. Find the reverse of a number and print in main function.

4. Write a menu driven program to perform the following operations using sing function

1.To find the sum of cubes of odd digit of number.(For eg. If number 123 then sum of cubes of odd digit be 1+27=28)

2.Check the number is palindrome or not.

5. Write a menu driven program to perform the following operations using function.

1.To print odd numbers upto n in descending order.

2.To calculate the multiplication of all digit(For eg. If n is 345 then multiplication of digits will be 3*4*5=60

6. Write a menu driven program to display the following series using function.

1. 1, -4, 7, -10 ……n 2.

10

11 11

12 12 12

13 13 13 13

14 14 14 14 14

7. Write a menu driven program to perform the following operations ,using function(pass N as integer argument)

Page 2: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

1.To find out the number is Armstrong number or not e.g. 153=13+53+33

2.Print smallest even digit from number.

8. Write a menu driven program to perform the following operations ,using function(pass N as integer argument)

1.To count how many even digit in a number for ex. 123 contain one even digit.

2.Print odd numbers in descending order.

9. Q34 Write a menu driven program to perform the following operations ,using build in function

1.To find sum of prime numbers upto n numbers.

2.To count the numbers those are divisible by 3 and 7(from 1 to n)

10. Write a menu driven program to perform the following operations ,using function(pass N as integer argument)

1.To check N is oerfect number or not.

2.To check that N is even, odd or prime.

11 Write a menu driven program to perform the following operations ,using function(pass N as integer argument)

1.To check N is oerfect number or not.

2.To check that N is even, odd or prime.

12. WAP to Input num_of_travellers and allot num_of_buses accordingly and display it.(accept no. of travelers as function argument & return no. of

buses). Num_of_travellers Num_of_buses

< 20 1

>=20 and < 40 2

>=40 3

13. WAP To input name and age of candidate for election and according to age allot the symbol to candidate and display the data.(accept age as function argument and return symbol of candidate)

Age Symbol

<18 or >60 0 >=18 and <=40 1

>40 and <=60 2

Page 3: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

14. WAP to Calculate commission for salesman.Get sales made from the user and calculate commission as follows:use sales as function argument and

return the comm.

If sales made Comm.

<10000 500+10% of salary

10000-20000 1000+15% of salary

>20000 1500+20% of salary

INFORMATICS PRACTICES (Code 065)-2015-16

CLASS :- XI

(Winter Holiday Homework)

SECTION A

Q1. Answer the following questions:

Dream Land Enterprises has computerized its billing. The following data entry screen is used to generate bill.

Page 4: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

The criteria for calculation of delivery and handling charges is as given below-

Category of City Charges

A Class Rs. 3500

B Class Rs. 4000

C Class Rs. 4500

I. Write the code to make the text fileds txtSubTotal, txtTax, txtDelHanCh and txtTotal non editable and set the category of city as C class.

II. Write code to do the following- a) Write the code for Calculate button to calculate and display Sub Total, Tax, Delivery & Handling

Charges and Total depending on the category of the city. o Sub Total is calculated as Unit Price * Quantity. o Tax is calculated as 7.85% of Sub Total o Total is calculates as the sum of Sub Total, Tax and Delivery and Handling Charges. If

Company Employee check box is checked then tax should be 2.5%. b) When Clear button is clicked all the text boxes should be clear and Close the application when Exit

button is pressed.

c) Write a java method to display the name of week days?

d) Differentiate call by value and call by reference e) Write a java code to obtain list of selected items from a list namely NameList

Q2. Answer the following question:-

i) Differentiate between a Text Field, Text Area and password field.

ii) What is the difference between if and switch statements?

iii) What are the operators supported by Java explain logical operators?

Page 5: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

iv)

v)

Given the following expression:-

a ) res= 30; b ) res==30;

(i) What is the difference between these two statements? (ii) What will be the value of res if initial value of res is equal to 48

Write a java code for the Item event handler of a checkbox(namely incCB) that

increments a variable total and display it on a label(namely count) the checkbox is

selected.

vi) How private members different from public and private members of a class?

Q3. Answer the following questions.

a) State the output of the following code:

int a = 10 , b = 5 ;

if ( a > b ) {

if ( b > 5 )

tf1. setText ( " b is " + b ) ;

}

else

tf1. setText ( "a is " + a ) ;

b) What will be the output of the following code fragment when the value of ch is ‘B’.

switch (ch) {

case ‘A’ : ta1. append (" Grade A " );

Page 6: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

case ‘B’ : ta1. append (" Grade B " );

case ‘C’ : ta1. append (" Grade C " );

case ‘D’ : ta1. append (" Grade D " );

break ;

default : ta1. append (" Grade F " );

}

a) Rewrite the following code using do-while loop.

for ( i = 0 ; i < 10 ; i ++ )

ta1. append ( 2 + " x " + i + " = " + ( 2 * i ) ) ;

d) Rewrite the following program code using a switch statement :

if ( code = = 1 )

Month = "January" ;

else if ( code = = 4 )

Month = "April" ;

else if ( code = = 8 )

Month = "August" ;

else

Month = "No Match" ;

e) The following code has error(s). Rewrite the correct code underlining all the corrections made:

int Sum = 0 , Step = 5 ;

int I ;

Page 7: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

for ( i = 0 ; i < = 5 , i ++) ;

{

Step += 5 ,

Sum += Step ;

}

jTextArea1 . showText ( " " + Sum )

f) Find error :-

if (sex==1)

jLabel1.setText(“Male”);

else ;

jLabel1.setText(“Female”)

g) What will be the value of x and y after execution of following code :

int x , y = 0 ;

for ( x = 1 ; x < = 5 ; ++x )

y = x + + ;

- - y ;

Section B

Q4. Answer the following questions.

a) Create a table customer based on the following chart:-

Field Name Type Constraint Cust_no Int(2) PRIMARY KEY D_name Varchar(15)

Page 8: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

b) Create a query to add the following data in the above table:- 3, Food, Gautam Mishra, 3rd may 2011, 12875.25

c) Write a query to display records whose Cust_name start from letter ‘a’ and sorted alphabetically order of d_name.(Customer table)

d) Display those record whose amount greater than 12000 and Purchase_date more than ‘1999-01-12’

e) Add one more column in above table(Address varchar(30))

f) Drop one column amount from above table

Q5. Answer the following questions.

a) Name the SQL commands for the following:- i) To MODIFY ROW in a table. ii) To view structure of the table

b) What is primary key? How is it different from candidate key? Explain with the help of suitable example.

Cust_name Varchar(30) NOT NULL Purchase_date Date

amount Double(6,2)

Page 9: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

शीतकालीनpअवकाशp२०१५ -११

कक्षाpग्यारहवीींp

हहींदी

१. जानसींचारpमाध्यमpसेpबीसpप्रश्नpउत्तरpसहहतpतैयारpकीजजएp| २. हकन्हीpदोpववषयोंpपरpफीचरpललजिएp| ३. हकन्हीpदोpकववताओींpकाpकाव्यpसौन्दययpस्पष्टpकीजजएpp| ४. कोईpभीpदोpऔपचाररकpपत्रpसम्पादकpकेpनामpललिोp (हकसीpभीpसामाजजकpसमस्याpकेpसम्बन्ीpमकp)

ENGLISH CLASS: XI

1. Read Chapters 6 & 7 of ‘The Canterville Ghost’ and write Summary of each. 2. Learn & write Q- Ans. of Ch-5 ‘The Browning Version’. 3. Read Ch-4 Hornbill: ‘The Ailing Planet’ and make notes & write summary of it. 4. Study tenses (active & passive voice). 5. Write any one example from each of the following: notice, poster, advertisement, article, letter,

speech, report and debate. 6. Practice unsolved passages for note making and comprehension from the study material.

Holiday homework for biology class xi

1. Make an investigatory project on any topic related to biology.

2. Make a table of digestive enzymes produced by digestive system.

Page 10: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

State their sources, functions and food on which they act and their

end products formed.

3. Complete the questions and answers of the lesson “plant growth and

development.”

Mathematics holiday home work for class xi

1. Prepare one project work for third term.

2. 2. Do the miscellaneous exercise of chap straight line and

conic sections.

Winter Holidays Homework

Class – XI – Physics

1) What do you mean by absolute zero and absolute scale of temperature?

2) What is meant by triple point of water? What is the advantage of taking triple point as the fixed point for a temperature scale?

3) What do you mean by ideal gas temperature? Does it depend upon the nature of the gas? What is liquid thermometer?

4) What are the advantages of using mercury as a thermometric substance above other liquids?

Page 11: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

5) What is thermal expansion? What are the different types of it?

6) Why do solids expand on heating? 7) Show that the coefficient of cubical expansion

of an ideal gas at constant pressure is equal to the reciprocal of its absolute temperature.

8) Derive the relation b/w α, β and γ. 9) Explain thermal expansion of solids on the

basis of potential energy curve. 10) Mention some applications of thermal

expansion in daily life. 11) How does the density of a solid or a liquid

vary with temperature? 12) By a simple experiment show that

temperature of a substance remains constant during its change of state?

13) What is the effect of pressure on melting point of substance?

14) What is the effect of pressure on boiling point? Explain with experiment.

15) Describe a simple experiment to demonstrate boiling of water at a temperature much lower than 1000c?

Page 12: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

16) What is latent heat? Give its unit? With the help of suitable graph explain latent heat of fusion and latent heat of vaporization?

17) What is thermal conduction? 18) What do you mean by variable state and

steady state in thermal conduction? Define temperature gradient?

19) State the factors on which the conduction of heat through a substance depends. Obtain the experiment for the heat conductor and hence define the coefficient of thermal conduction and give its unit and dimension.

20) Describe some applications of conductivity in daily life.

21) Give Reasons : i) A metallic handle appears colder than

wooden door. ii) Cooking utensils are provided with

wooden handle. iii) A new quilt (Rajayi) is warmer than

an old one. iv) Birds swell their feather in winters. v) Ice is packed in saw-dust (Lakdi ka

Burada).

Page 13: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

vi) Eskimos make double-walled houses of block of ice.

vii) When a wire gauge is placed over Bunsen burner, the flame does not go beyond the gauge.

viii) A refrigerator is provided with insulated wall.

22) What are thermal convection? Briefly explain. How are convention current setup in water?

23) Describe some of the phenomena which are based on thermal convention.

24) What is radiation? Give Example. 25) State Newton’s Law of Cooling. Express it

mathematically. How can this law be verified experimentally.

26) What is thermal radiation? 27) Briefly describe the constant of

Calorimeter. 28) What is Calorimetry? State the principle of

it.

Page 14: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

CLASS XI-CHEMISTRY

Homework

1) Prepare an Investigatory Project. (Individual) 2) Complete the classwork and homework copy

and Practical Record. 3) Solve Half- Yearly paper in Class Work Note. 4) Complete all the practicals in Record

(including all anions and cations upto 3rd Group).

5) Learn complete NCERT part I and NCERT part II upto p-block.

Class: 11th

ACCOUNTANCY

1. Solve half yearly question paper.

2. Practice: Preparation of financial statement of

sole proprietor-ship (with and without

adjustments).

Page 15: XI- COMP SCI - Welcome to Kendriya Vidyalaya No. - 2 ... COMP SCI Write a menu driven program to perform the following operations ppppp ppppppp ppp ppppppppp ppp pppppppp 1. To find

3. Complete project work of 3rd U.T.

Class xi-eco

1 Exercise question of mean median and mode?

2 Draw five graph of each topic. A bar diagram B histogram C pie diagram D OGIVE?

3 Write formula of mean ,median, mode , qd, sd of individual ,discrete ,continuous series?

4 Solve five question of each topic . QD,SD?

5 Learn following chapter of indian economy. Five year plan , new economy policy, poverty and rural

development?

BUSINESS STUDIES

Class 11th

1. Complete your project work.

2. Revise chapter : Small Business, Internal Trade.