Birla International School Kishangarh



BIRLA INTERNATIONAL SCHOOLSUMMER ASSIGNMENT/PRACTICE QUESTION PAPERCLASS – XIIINFORMATICS PRACTISESTime: 3 HoursMM:70Instruction: On the idea of recycle and reuse, the students are suggested to utilize the unused pages of old note-books, staple them together, cover it creatively with either newspaper or old calendar and make their home-work note book.Table of Tutorial Company:S.NoTutorClassesQuarterCountry0Tahira281USA1Gurjyot361UK2Anusha411Japan3Jacob321USA4Venkat401Brazil5Tahira362USA6Gurjyot402USA7Anusha362Japan8Jacob402Brazil9Venkat462USA10Tahira243Brazil11Gurjyot303USA12Anusha443UK13Jacob403Brazil14Venkat323USA15Tahira364Japan16Gurjyot324Japan17Anusha364Brazil18Jacob424UK19Venkat384USA1. Represent the above data in a dataframe.(2)2. Considering the tutoring company data, compute total classes per tutor.(2)3. Considering the tutoring company data, compute number of countries (count) per tutor.(2)4. Considering the tutoring company data, compute total classes by country.(2)5. Considering the tutoring company data, compute total classes on two fields, tutor and Company wise.(2)6. Considering the tutoring company data, compute average classes on two fields.(2)7. Given a data frame namely data as shown in adjacent figure (fruit names are row labels). Write code statement to:ColourCountPriceAppleRed3120AppleGreen9110PearRed25125Pear Green26150LimeGreen9970(a) find all rows with the label “Apple ”. Extract all columns.(2)(b) list only the columns Count and Price using loc.(2)(c) list only rows with labels ‘Apple’ and ‘Pear ’ using loc.(2)7. What is the difference between pivot() and pivot_table() functions?(2)8. A dataframe fdf stores data abougt passengers, flights and years. First few rows of dataframe are shown below.YearMonthPassengers02009January11212009February11822009March13232009April12942009May121 Using above dataframe, write commands for the following:(a) Compute total passengers per year.(2)(b) Compute average passengers per month.(2)9. Considering the tutoring company data table, Display histogram for the column Classes.(2)10. Create and array in the range 1 to 20 with values 1.25 apart. Another array contains the log values of the elements in first array.(a) Create a plot of first vs second array; specify the x-axis (containing first array’s values ) title as ‘Random Values’ and y-axis title as ‘Logarithm Values’.(2)(b) Create a third array that stores the COS values of first array and then plot both the second and third arrays vs first array. The COS values should be plotted with a dashdotted line.(2)(c) Change the marker type as a circle with blue color in second array.(2)(d) Create scatter chart as this : second array data points as blue small diamonds, third array data points as Black Circles.(2)11. TSS school celebrated volunteering week where each section of class XI dedicated a day for collecting amount for charity being supported by the school. Section A volunteered on Monday, B on Tuesday, C on Wednesday and so on. There are six section in class XI. Amount collected by sections A to F are 8000, 12000, 9800, 11200, 15500, 7300.(a) Create a bar chart showing collection amount.(2)(b) Plot the collected amount vs days using a bar chart.(2)(c) Plot the collected amount vs sections using a bar chart.(2)12. Create multiple line charts on common plot where three data ranges are plotted on same chart. The data range(s) to be plotted is/are:Data = [[5., 25., 45., 20., ], [8., 13., 29., 27., ], [9., 29., 27., 39.,]](2)13. Create a histogram that plots two ndarrays x and y with 48 bins, in stacked horizontal histogram. Add plot title and axes titles to above plot. (2)14. Create a boxplot from the following set of data:34,18, 100, 27, 54, 52, 93, 59, 61, 87, 68, 85,78, 82,9115. Create the same box plot as previous question, but change the orientation to horizontal.(2)16. Add title as “Horizontal Boxplot” and y-axis title as “Value-range” to previous boxplot.(2)17. The SQL SELECT provides clauses for sorting data and for summarizing results, Write the names of clauses for these.(2)18. You want to group the result set based on some column’s value. In addition, you want that the grouped result should appear in a sorted order. In which order will you write the two clauses (for sorting and for grouping). Give example to support your answer.(2)19. Differentiate between CHAR and VARCHAR datatypes.(2)20. What is datatype? What are main objectives of datatypes?(2)21. How DDL command is different from DML command?(2)22. Consider the following table named “SOFTDRINK”, Write commands of SQL for (i) to (iv).Table : SOFTDRINKDRINKCODEDNAMEPRICECALORIES101Lime and Lemon20.0120102Apple Drink18.0120103Nature Nectar15.0115104Green Mango15.0140105Aam Panna20.0135106Mango Juice Bahaar12.0150(i) To display the name and drink codes of those drinks that have more than 120 calories.(1)(ii) To display drink codes, names and calories of all drinks, in descending order of calories.(1)(iii) To display names and price of drinks that have price in the range 12 to 18 (both included).(1)(iv) Increase the price of all drinks in the given table by 10%.(1)23. Write a query to display the difference of highest and lowest salary of each department having maximum salary>4000.(1)24. Gopi Krishna is using a table Employee. It has the following columns: Code, Name, Salary , DeptcodeHe wants to display maximum salary department wise. He wrote the following command:Select Deptcode, Max(Salary) from Employee;But he did not get the desired result. Rewrite the above query with necessary changes to help him get the desired output.(1)25. Shanya Khanna is using a table Employee. It has the following columns:Admno, Name, Agg, Stream[column Agg contains Aggregate marks]She wants to display highest Agg obtained in each Stream.She wrote the following statement:Select Stream, Max(Agg) from Employee;But did not get the desired result. Rewrite the above query with necessary changes to help her get the desired output.(1)26. What is the difference between a Where clause and a Having clause of SQL Select statement?(1)27. Distinguish between Alter Table and Update commands of MySQL.(1)28. In a Database – SAMS and VENDER are two tables with the following information. Write MySQL queries for (i) to (iii), based on tables SAMS and VENDER:Table – SAMSICodeINamePriceColourVCodeS001Refrigerator2000BlueP01S002Mobile Phone45000BlackP02S003LCD60000SilverP03S004Washing Machine12500SmokeP01S005Air Conditioner16000WhiteP03Table : VENDERVCodeVNAMEP01SatishP02ManojP03SubodhP04Jacob(i) To display ICode, IName and VName of all the vendors, who manufacture “Refrigerator”.(1)(ii) To display IName, ICode, VName and Price of all the products whose price is more than 20000.(1)(iii) To display vendor names and names of all items manufactured by vendor whose code is “P03”.(1)********************************* ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download