Tuesday 28 February 2023

HTML SAMPLE SNAKE GAME CODE

HTML SAMPLE SNAKE GAME CODE
CODE : 

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style>
  html, body {
    height: 100%;
    margin: 0;
  }

  body {
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  canvas {
    border: 1px solid white;
  }
  </style>
</head>
<body>
<canvas width="400" height="400" id="game"></canvas>
<script>
var canvas = document.getElementById('game');
var context = canvas.getContext('2d');

var grid = 16;
var count = 0;
  
var snake = {
  x: 160,
  y: 160,
  
  // snake velocity. moves one grid length every frame in either the x or y direction
  dx: grid,
  dy: 0,
  
  // keep track of all grids the snake body occupies
  cells: [],
  
  // length of the snake. grows when eating an apple
  maxCells: 4
};
var apple = {
  x: 320,
  y: 320
};

// get random whole numbers in a specific range
// @see https://stackoverflow.com/a/1527820/2124254
function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min)) + min;
}

// game loop
function loop() {
  requestAnimationFrame(loop);

  // slow game loop to 15 fps instead of 60 (60/15 = 4)
  if (++count < 4) {
    return;
  }

  count = 0;
  context.clearRect(0,0,canvas.width,canvas.height);

  // move snake by it's velocity
  snake.x += snake.dx;
  snake.y += snake.dy;

  // wrap snake position horizontally on edge of screen
  if (snake.x < 0) {
    snake.x = canvas.width - grid;
  }
  else if (snake.x >= canvas.width) {
    snake.x = 0;
  }
  
  // wrap snake position vertically on edge of screen
  if (snake.y < 0) {
    snake.y = canvas.height - grid;
  }
  else if (snake.y >= canvas.height) {
    snake.y = 0;
  }

  // keep track of where snake has been. front of the array is always the head
  snake.cells.unshift({x: snake.x, y: snake.y});

  // remove cells as we move away from them
  if (snake.cells.length > snake.maxCells) {
    snake.cells.pop();
  }

  // draw apple
  context.fillStyle = 'red';
  context.fillRect(apple.x, apple.y, grid-1, grid-1);

  // draw snake one cell at a time
  context.fillStyle = 'green';
  snake.cells.forEach(function(cell, index) {
    
    // drawing 1 px smaller than the grid creates a grid effect in the snake body so you can see how long it is
    context.fillRect(cell.x, cell.y, grid-1, grid-1);  

    // snake ate apple
    if (cell.x === apple.x && cell.y === apple.y) {
      snake.maxCells++;

      // canvas is 400x400 which is 25x25 grids 
      apple.x = getRandomInt(0, 25) * grid;
      apple.y = getRandomInt(0, 25) * grid;
    }

    // check collision with all cells after this one (modified bubble sort)
    for (var i = index + 1; i < snake.cells.length; i++) {
      
      // snake occupies same space as a body part. reset game
      if (cell.x === snake.cells[i].x && cell.y === snake.cells[i].y) {
        snake.x = 160;
        snake.y = 160;
        snake.cells = [];
        snake.maxCells = 4;
        snake.dx = grid;
        snake.dy = 0;

        apple.x = getRandomInt(0, 25) * grid;
        apple.y = getRandomInt(0, 25) * grid;
      }
    }
  });
}

// listen to keyboard events to move the snake
document.addEventListener('keydown', function(e) {
  // prevent snake from backtracking on itself by checking that it's 
  // not already moving on the same axis (pressing left while moving
  // left won't do anything, and pressing right while moving left
  // shouldn't let you collide with your own body)
  
  // left arrow key
  if (e.which === 37 && snake.dx === 0) {
    snake.dx = -grid;
    snake.dy = 0;
  }
  // up arrow key
  else if (e.which === 38 && snake.dy === 0) {
    snake.dy = -grid;
    snake.dx = 0;
  }
  // right arrow key
  else if (e.which === 39 && snake.dx === 0) {
    snake.dx = grid;
    snake.dy = 0;
  }
  // down arrow key
  else if (e.which === 40 && snake.dy === 0) {
    snake.dy = grid;
    snake.dx = 0;
  }
});

// start the game
requestAnimationFrame(loop);
</script>
</body>
</html>

Thursday 23 February 2023

FYBSC IT ( SEM 2) IMP QUESTIONS WEB DEVELOPMENT

FYBSC IT  ( SEM 2) IMP QUESTIONS WEB DEVELOPMENT 

UNIT 1

What is WWW? Write difference between WWW and Internet.

List and explain different types of CSS selectors with example.

Write short note on Uniform Resource Locator.

Explain the following HTML tags with the help of example:

(i) < br> (ii)<pre> (iii) <h6> (iv) <p> (v) <a>

What is proxy server? Discuss its application with reference to internet.

Explain different types of lists available in HTML with the help of example

List and explain important applications of internet in brief.

Explain different approaches to style sheets.

Write a short note on internet address.

How hyperlinks are created in HTML? Explain with the help of an example.

What is search engine? Explain its working

What is internet? Explain any two applications of internet.

Write a short note on domain name server.

Write a short note on search engine.

Explain the structure of HTML5 file.

List different formatting tags. Explain with example any three of them.

List and explain different types of cascading style sheets.

UNIT 2

How to format and position a division on a web page? Explain with example

How will you create graphical navigation bar? Explain with example.

Explain <audio> and <video> tags in HTML 5.

Write HTML Code to design a web page with Image Maps.

List and explain any five HTML Form controls with example

What is image map? Write the difference between client-side and server-side

Image mapping.

Write the purpose of using: rowspan, colspan, cellspacing and cellpadding in Table

tag. Give example.

Write HTML code for embedding an audio and video in a web page.

Explain the semantic tags of HTML5.

Write HTML code to design a form to enter name of the user, his/her password,

and gender (radio button for male/female), hobbies (checkbox for

reading/singing/sports), favorite color (list box red/green/blue) and submit and reset button.

Explain <DIV> tag with the help of suitable example

Explain with example how text based navigation bar is created.

What is image map? Explain with example server side image map.

List various HTML5 semantic tags. Explain with example any four of them.

Explain following attributes of td tag:

i. rowspan ii. colspan iii. width iv. valign v. bgcolor

Write a HTML5 program to display college admission form.

List various tags used to embed audio in a page. Explain with example any two of them.

UNIT 3

Write a short note on “for…in” looping statement in JavaScript.

Write a program in JavaScript to accept a sentence from the user and display the number

of words in it. (Do not use split ( ) function).

Explain following events:

(i)onclick (ii) onfocus (iii) onmouseover (iv) onload (v) onerror

Write a JavaScript program using various methods of Date Object.

Write a short note on comparison and logical operators in JavaScript.

List various features of JavaScript

Differentiate between client side and server side JavaScript.

Write a JavaScript program to display all the prime numbers between 1 and 100.

List and explain the methods of string object of JavaScript.

Explain the following operators of JavaScript:

(i)                 new (ii) delete (iii) this (iv) void (v) ,(Comma)

Define events and event handlers. List various types of mouse event

Explain any five special operators of java script.

Write html code to display factorial of number entered by user.(use do while loop)

What is the purpose of break and continue statement. Give suitable example.

Explain regular expression in java script.

List different methods of document object. Explain with example any two of them.

Explain following event attributes:

i. onblur ii. onchange iii. ondblclick iv. onkeydown v. onmousedown

UNIT 4

What is PHP? Write the advantages of using PHP for server-side web scripting.

Write a PHP code to find the greater of two numbers. Accept the numbers from the user.

Explain any five string functions available in PHP with example.

What are the different methods available in PHP for passing the information from one page to another? Explain.

Write a short note on PHP data types.

Explain associative array in PHP with the help of example.

Write the difference between GET and POST methods in PHP.

Explain different types of arrays available in PHP.

Write a PHP program to demonstrate the use of different string functions.

Explain error handling in PHP.

Write a short note on variables in PHP.

Write a PHP program to create one dimensional array.

How PHP variables are used? Explain with example.

Write down the rules to determine the “truth” of any value not already of the Boolean type:

Explain doubly quoted strings in PHP. Give suitable example.

Explain the ternary operator with example.

Write the purpose of following string methods:

i. strcasecmp ii. strrpos iii. strstr iv. chop v. strtolower

List and explain functions for inspecting arrays.

UNIT 5

Explain following PHP/MYSQL functions:

(i) mysql_connect ( ) (ii) mysql_close ( ) (iii) mysql_query ( )

(iv) mysql_select_db ( ) (v) mysql_error ( )

Write a PHP program to demonstrate the use of cookies in PHP.

Compare POSIX and PERL style Regular expressions of PHP.

List various HTTP functions available in PHP. Explain header ( ) function in detail.

Write a PHP program to create a database named “employee”. Create a table named

“salary” with following fields (eid, ename, esalary). Insert 3 records of your choice.

Display the names of the employees whose salary is between 15000 to 20000 in a tabular format.

Write a short note on PHP Session.

What is a cookie? How to store and retrieve the values in cookie in PHP?

Explain any five PHP/MYSQL functions with example.

Write a PHP program to send email with attachment.

How to start and destroy a session and how to store a session variable in PHP?

Explain.

Write a short note on regular expressions in PHP.

Write a PHP code to create a database “Company” and to create a table

“Employee” (emp_id, emp_name,emp_dept,emp_salary)

Explain join with suitable example.

List various fetching functions. Explain with example any two of them.

List and explain function used to create database programmatically.

Write a PHP program to display boolean data from database on checks button.

Write down the use of following PHP-MySQL functions

mysql_affected_rows ii. mysql_data_seek iii. mysql_fetch_array

mysql_field_type v. mysql_insert_id

Explain following session functions:

i. session_register ii. session_is_registered iii. session_unset

iv. session_decode v. session_id

 


Monday 20 February 2023

जर मी शिक्षक झालो तर मराठी निबंध

 

जर मी शिक्षक झालो तर मराठी निबंध

(१०० शब्दात)

मला लहानपणा पासूनच शिक्षक व्हायला खुप खुप आवडते त्यामुळे मी जर शिक्षक झालो तर प्रत्येक विद्यार्थाला खूप आत्मयतेने शिकवण्याचा प्रयत्न करेन. मी शिक्षक बने पर्यंत जो काही ज्ञानाचा साठा मी कमावेल त्यातील कण कण मी विद्यार्त्यापर्यंत कसा पोहचेल यासाठी प्रयत्न करेल.

मी विद्यार्थांना चांगली शिकवण देईल, त्यांना चांगली शिस्त लावेल, वडीलधाऱ्या माणसांचा आदर करायला शिकवेल त्यांच्यावर उत्तम असे संस्कार करेल. जे की त्यांना भावी आयुष्यात एक आदर्श नागरिक होण्यासाठी मदत करतील.

जर मी शिक्षक झालो तर प्रत्येक विद्यार्थ्यास शिक्षणाची समान संधी देईल. सर्वांना सारखेच शिक्षण देईल, कोणत्याही विद्यार्त्याचा तिरस्कार करणार नाही. मी प्रत्येक विद्यार्थाला असे शिक्षण देईल की तो भविष्यात कुठे नोकरीला जरी नाही लागला तरी तो आपल्या देशाचा एक आदर्श नागरिक मात्र नक्कीच बनेल.

Friday 17 February 2023

FYBSC IT ( SEM 2) IMP QUESTIONS GREEN COMPUTING

FYBSC IT ( SEM 2) IMP QUESTIONS GREEN COMPUTING 

UNIT 1

What are the steps involved for Measuring of carbon footprint?

What is carbon footprint? Briefly explain how to compute company’s carbon footprint?

How hardware deployments can affect the environment?

Write a note on Equipment Disposal.

What are the steps taken by JAPAN for managing their own e-waste problem?

What are the Basel Action Network functions?

Write a short note on Basel Action Network.

Explain any five e-waste laws of states in US.

List and explain the various toxins present in computer systems.

Discuss about cost saving in power consumption by desktops and data centres.

Write a short note on United Nation’s solving the E-waste Problem (Step).

Discuss the European Union’s e-waste management WEEE and its RoHs directives.

Explain how green computing effect on cost saving.

How hardware deployments can affect the environment?

Mention the steps taken by CHINA in managing their own e-waste problem?

What StEP stands for? Explain objectives of StEP

What is Green IT? What are motives behind Green IT practices?

Write down the advantages of reusing equipment?

Write a short note on RoHS.

UNIT 2 

Write a note on Data De-Duplication and Virtualization.

Explain MAID and RAID.

What is polling? Give example.

List and explain the issues regarding power consumption and cooling costs.

Explain Hot Aisle (path)/Cold Aisle and Raised Floors.

List and explain datacentres design and decision making issues

Explain the features and hardware specification of NORHTEC and EXCITO.

How can you minimize excessive power output from wireless devices?

Explain the ways of reducing power consumption in storage.

How to calculate cooling requirement of a system? Explain using suitable example.

Write a note on cooling optimization by data centre design.

Explain any two best practices that can help optimize the airflow around servers

How computer monitor settings save energy?

How to achieve proper humidity levels?

How to prevent Recirculation of Equipment Exhaust?

State the advantages of custom centralized air-handling system.

Explain any two ways to reduce power usage

Explain any two low cost devices for checking power on workstations

What is economizer? What are its different types? Explain any one.

Explain how cooling needs are calculated.

What are different ways to optimize the airflow around servers and networking?

Equipment? Explain any two of them

UNIT 3

List and explain decision making pyramid with its levels.

Which things are necessary for environmentally preferable purchasing plan?

How to find out which products have low levels of toxins?

Which things are needed to go paperless in organization?

What is the use of Microsoft Office SharePoint Server 2007? List its features.

What is Value Added Network? Give its benefits.

Briefly explain steps in setting up a telecommuting program.

Write a note on Environmentally Preferable Purchasing Plan.

List the tips to keep water usage under control. List the issues to prevent wasted water.

Write a short note on intranet.

What is Microsoft Office SharePoint Server 2007?

What are the advantages and obstacles in using EDI in an organization?

What are the ways to control the use of water in organisation?

Which things are necessary for evaluating suppliers for their level of environmental responsibility?

Describe intranet? How to build it?

What is Telecommuting? Explain in brief.

Which things are needed to go paperless in organization?

Write a note on PDA and Tablet PC.

What are different issues that should be considered to know your supplier?

How the issue of CO2 emission is dealt with at different levels of the decision making pyramid.

What are different monitoring ideas?

Write down different reasons for using PDF for paperless documentation.

What is intranet? What are different components that are required for building intranet?

What is EDI? Write down advantages and problems of EDI.

UNIT 4

Explain the recycling problems in China and Africa.

How to determine the system’s long life?

Which are benefits to leasing the equipment?

Write a short note on Electronic Product Environmental Assessment Tool (EPEAT) certification.

What is Blade server? Give its benefits.

What is the use of Remote Desktop? Explain its components.

What is refurbishing? What is commercial and non-commercial refurbishing?

Briefly explain the phases of a computer product’s life cycle.

How to clean a hard drive?

Write a note on energy star program for computers.

Explain benefits and features of blade server.

How to configure a remote desktop server?

List various ways to clean a hard drive. Explain any two.

Write a short note on refurbishing.

Give advantages and disadvantages of buying equipment’s.

Explain how remote desktop server is configured.

Explain Restriction of Hazardous Substances certification.

Define and explain the terms packaging and Toxins with respect to Hardware Considerations.

UNIT 5

How CRM segregate the people of organization in group?

What are the steps involved for good green procurement program?

Explain characteristics of Software as a Service.

Explain transitioning four-step process.

Write a note on SMART goals.

Which steps are involved to conduct energy audit?

How BI tools and MS SQL Server are useful in order to measure and track data?

Write a note on Customer Relationship Management. Explain its technology components.

What is Green Procurement?

Write a note on SMART Goals.

Explain the role of Chief Green Officer?

What is baseline data, benchmarking and data analysis in equipment check-up.

List and explain tools used for measuring and tracking our data.

What is the difference between Application Service Providers and Software as a Service?

Which area needs to be updated in organization to reduce the amount of waste?

Explain characteristics of Software as a Service.

Describe the work of Chief Green Officer.

List and explain key strategies to review action plan.

Tuesday 14 February 2023

FYBSC IT ( SEM 2 ) IMPORTANT QUESTIONS C++

FYBSC IT ( SEM 2  ) C ++

IMPORTANT QUESTIONS 

UNIT 1 

What is procedure oriented Programming? What are its characteristics?

Differentiate between Object Oriented and Procedure & Oriented Programming

Paradigms.

Discuss procedure oriented programming paradigm. Also discuss its characteristics.

What is object oriented programming paradigm? Discuss its characteristics.

Discuss the need and advantages of Object Oriented Programming.

Discuss various applications of Object Oriented Programming.

What do you mean by Dynamic and static binding.

Write a short notes on (i) Object (ii) Class

Define any two of the following

(i) Classes (ii) Objects (iii) Data abstraction

Discuss benefits and applications of oops.

Write a short note on data abstraction and data encapsulation

Write down advantages and disadvantages of procedure oriented language.

Explain object oriented development.

Write down benefits of using object oriented programming.

Write a short note on Data abstraction and data encapsulation.

Explain dynamic binding with example. Give proper example.

What is inheritance? Explain with example the concept of multiple inheritances

UNIT 2 

What is a class? Illustrate the use of class with a simple c++ program.

What are inline functions? How an outside function can be made inline?

What is a constructor? Explain its characteristics. List various types of constructors?

What are friend functions? What are their characteristics? Write a small program to

Illustrate the use of a friend function.

Explain the use of parameterized constructors with a programming example.

What do you understand from nesting of member functions? Explain with suitable programming example

What is friend function? Write a friend function to display mark sheet of the F. Y. B.Sc. IT student.

What is class? Explain with example how objects are passed as argument to member function and objects are returned from member function.

What is inline function? Explain with example.

What is use of constructor? Explain with example parameterized constructor.

Write a C++ program to demonstrate the use of constructor and destructor.

What are objects? How they can be declared? Also discuss memory allocation for objects in object oriented programming

How data members and member functions of a class can be accessed. Write a program to demonstrate the concept of accessing public members of a class.

What is a constructor? List various types of constructors. Explain copy constructor

What is a friend function? How it can be declared? What are its characteristics?

What is Member function ? explain the nesting of member functions 


UNIT 3

What is function overloading? Explain with suitable example.

What is operator overloading? List the operators which can be overloaded and which cannot be overloaded.

Write a c++ program to overload unary minus operator.

What are virtual functions? Explain.

Define the following

(i) Abstract Class (ii) Pure Virtual Function

What is a pointer? Write a program to illustrate its use

What is operator overloading? Write down the rules for operator overloading.

How binary operators are overloaded? Write a C++ program to overload binary operator +.

What is method overriding? Explain with example.

Explain with example abstract class.

Explain virtual destructor. Give suitable example

What is this pointer? Write a C++ program to demonstrate use of this pointer.

What are virtual functions? What are the rules for writing virtual functions?

UNIT 4

What do you understand from the concept of inheritance? Explain its various types.

Explain the use of various visibility modes used in inheritance.

Discuss the role of constructors in derived classes in detail.

What is an exception? What are advantages of exception handling mechanism in a

Program?

Explain the concept of throw and catch with suitable example.

Write a c++ program to illustrate multilevel inheritance.

Can private members of a base class are inheritable? Justify.

Explain with example multilevel inheritance.

Explain how a base class is derived in public and private mode.

What is exception? Explain exceptions handling mechanism?

What happen when raised exception is not caught by catch block? Explain with suitable example.

UNIT 5

What are class templates? Explain their use. How a class template can be declared?

Explain function template with a programming example.

Write a c++ program to implement bubble sort using function template.

Explain the working of files in c++.

Explain various methods to detect end of file in a c++ program.

Explain the following (i) seekg() (ii) seekp()

Explain with example how function templates are used.

Explain how compiler calls to a class and function template.

Write a C++ program which defines and uses student class template.

What is file? Write down the steps for manipulating files in C++.

Explain the hierarchy of file stream class.

What are different methods of opening a file? Write a program to open file and enter student details into the file using any method.

Explain various methods to detect end of file.

Write a program to open two files country and capital simultaneously and print the Name of the capital in front of the country.

Explain the use and purpose of following functions

(i) seekg() and seekp()

(ii) tellg() and tellp()

What are class templates? Explain their use. How they can be declared?

Define a class named vector. Illustrate the use of vector class template for performing the scalar product of int type vectors as well as float type vectors.

What is a function template? Write a C++ program to demonstrate the use of function templates?

Saturday 4 February 2023

FYBSC IT ( SEM 2 ) NUMERICAL METHODS

 FYBSC IT ( SEM 2 ) NUMERICAL METHODS

IMPORTANT QUESTIONS 

UNIT 1 ( 15 MARKS )

1.State the characteristics of typical mathematical models of physical world. Explain with example.

2.Discuss the conservation laws and engineering with respect to mathematical models.

3.Define significant figures, accuracy ,precision , truncation error.

4.Define absolute,relative,percentage and roundoff errors

5.For x = 3.4537 is correct upto 4 significant figures find relative and percentage error

6.Suppose that you have the task of measuring the lengths of a bridge and a rivet and come upwith 9999 and 9 cm, respectively. If the true values are 10,000 and 10 cm, respectively,compute (i) the true error and (ii) the true percent relative error for each case

7.Let p = 0.54617 and q = 0.54601. Use four-digit arithmetic to approximate p − q and determine the absolute and relative errors using (i) rounding and (ii) chopping.

8.Use zero- through third-order Taylor series expansions to predict f (3) for 𝑓 (𝑥) = 25𝑥3 − 6𝑥2 + 7𝑥 – 88 using a base point at x = 1.

9. Create a hypothetical floating-point number set for a machine that stores information using7-bit words. Employ the first bit for the sign of the number, the next three for the sign andthe magnitude of the exponent, and the last three for the magnitude of the mantissa

10. Compute the condition number for 𝑓(𝑥) = 𝑡𝑎𝑛𝑥 𝑓𝑜𝑟 𝑥̃ =𝜋/2+ 0.1 (𝜋/2) & 

𝑓(𝑥) = 𝑡𝑎𝑛𝑥 𝑓𝑜𝑟 𝑥̃ =𝜋/2+ 0.01 (𝜋/2)

11. Explain blunders, formulation errors and data uncertainty.

12.Use Taylor series expansions with n = 0 to 6 to approximate 𝑓 (𝑥) = 𝑐𝑜𝑠𝑥 at x = π/3 on the basis of the value of f (x) and its derivatives at xi =π/4.

13. Evaluate and interpret the condition number for𝑓 (𝑥) =𝑠𝑖𝑛𝑥/1 + 𝑐𝑜𝑠𝑥 𝑓𝑜𝑟 𝑥 = 1.0001𝜋

14. What are total numerical errors? Discuss stability and condition of a mathematical Problem.


UNIT 2 ( 15 MARKS )

1. Use the Bisection method to find solutions accurate to within 10−2 for

 𝑥3 − 7𝑥2 + 14𝑥 − 6 = 0 in the interval [3.2, 4].

2.The fourth-degree polynomial 𝑓 (𝑥) = 230𝑥 4 + 18𝑥3 + 9𝑥 2 − 221𝑥 – 9 in

[0, 1] correct up to 4 decimal places using Regula-Falsi method.

3.Find the root of 4𝑥2 − 𝑒𝑥 − 𝑒−𝑥 = 0 using Newton Raphson correct upto 4 decimal places using initial value as 1.

4.Given the cube of integers in the following table. Find the values of (53. 5 ) and 153 using Newton’s interpolation formula.

5.Find f (0.9) if f (0.6) = −0.17694460, f (0.7) = 0.01375227, f (0.8) = 0.22363362,

f(1.0) = 0.65809197 using Lagrange’s Interpolation formula.

6.Using appropriate interpolation formula find f(4.25) from the table:

X     4.0      4.1      4.2    4.3      4.4     4.5

f(x) 27.21 30.18 33.35 36.06 40.73 54.01

7.Determine the real root of 𝑓(𝑥) = −26 + 85𝑥 − 91𝑥 2 + 44𝑥3 − 91𝑥2 + 𝑥5 between 0.5 and 1.0 correct up to 3 decimal places using bisection method.

8.Determine the positive real root of ln(𝑥4) = 0.7 between 0.5 and 2 using method of false position.

9.Solve: 𝑥 − 0.8 − 0.2𝑠𝑖𝑛𝑥 = 0 using Newton Raphson method correct upto 4 decimal places starting with initial value 0.

10.Using the necessary interpolation formula find f(1) and f(1.5) from the table:

X    –1  0  2  3

f(x) –8  3  1 12


                                               UNIT 3 ( 15 MARKS )

1.Solve the following system by using the Gauss-Jordan elimination method.

𝑎 + 𝑏 + 2𝑐 = 1, 2𝑎 − 𝑏 + 𝑑 = −2

𝑎 − 𝑏 − 𝑐 − 2𝑑 = 4 , 2𝑎 − 𝑏 + 2𝑐 − 𝑑 = 0

2.Solve the following system by using the Gauss-Seidel iterative method.

10𝑎 − 𝑏 + 2𝑐 = 6 , −𝑎 + 11𝑏 − 𝑐 + 3𝑑 = 25

2𝑎 − 𝑏 + 10𝑐 − 𝑑 = −11 , 3𝑏 − 𝑐 + 8𝑑 = 15

3.Evaluate ∫ √1 − 8𝑥2𝑑𝑥 with limits {0, 0.3} using Simpson’s 3/8th rule.

4.Apply Taylor’s method of order two with N = 10 to the initial-value problem

𝑦′ = 𝑦 − 𝑡 2 + 1, 0 ≤ 𝑡 ≤ 2 ≤, 𝑦 (0) = 0.5

5.Using modified Euler’s method find the solution of

𝑦′ = 𝑐𝑜𝑠2𝑡 + 𝑠𝑖𝑛3𝑡), 0 ≤ 𝑡 ≤ 1; 𝑦(0) = 1 𝑤𝑖𝑡ℎ ℎ = 0.25

Given log 280 = 2.4472, log 281 = 2.4487, log 283 = 2.4518, log 286 = 2.4564. Find

[ 𝑑/𝑑𝑥 (𝑙𝑜𝑔𝑥)] 𝑥=280

Evaluate the following using Simpson’s 3/8th rule.

𝑠𝑖𝑛2𝜃/5 + 4𝑐𝑜𝑠𝜃𝑑𝜃 for limits (0 𝜋)

Use Euler’s method to approximate the solution for

𝑦′ = 𝑡−2(𝑠𝑖𝑛2𝑡 − 2𝑡𝑦), 1 ≤ 𝑡 ≤ 2, 𝑦 (1) = 2 𝑤𝑖𝑡ℎ = 0.5

Solve 𝑦′ = 𝑦𝑡2 + 1, 𝑦(0) = 0.5, 0 ≤ 𝑡 ≤ 2 using Runge Kutta 4th order method with h = 0.5

UNIT 4 ( 15 MARKS )

1.Fit an exponential model to:

x 0.4  0.8   1.2   1.6     2.0     2.3

y 800 975 1500 1950 2900 3600

2.Find the least square polynomial approximation of degree two to the data

x   0   1 2  3   4

y –4 –1 4 11 20

3.Find the best-fit values of a and b so that y = a + bx fits the data given in the table.

x 0  1    2     3   4

y 1 1.8 3.3 4.5 6.3

4.A painter has exactly 32 units of yellow dye and 54 units of green dye. He plans to mix as manyGallons as possible of colour A and colour B. Each gallon of colour A requires 4 units of yellow Dye and 1 unit of green dye. Each gallon of colour B requires 1 unit of yellow dye and 6 units of Green dye. Find the maximum number of gallons he can mix graphically.

5.Rita wants to buy x oranges and y peaches from the store. She must buy at least 5 oranges andThe number of oranges must be less than twice the number of peaches. An orange weighs150 Grams and a peach weighs 100 grams. Joanne can carry not more than 3.6 kg of fruits home. I) Write 3 inequalities to represent the information given above.ii) Plot the inequalities on the Cartesian grid and show the region that satisfies all theInequalities. Label the region Siii) Oranges cost 0.70 each and peaches cost 0.90 each. Find the maximum that Rita Can spend buying the fruits

Fit a second order polynomial to the data given below:

x 0      1     2      3       4      5

y 2.1 7.7 13.6 27.2 40.9 61.1

Fit a straight line to the given data regarding x as the independent variable.

x   1       2      3      4     5    6

y 1200 900 600 200 110 50

Consider the data below: Use linear least-squares regression to determine a function of the form y = bemx for the given data by specifying b and m.

x 1 2  3   4

y 1 7 11 21

A farmer can plant up to 8 acres of land with wheat and barley. He can earn ₹ 5,000 forevery acre he plants with wheat and ₹ 3,000 for every acre he plants with barley. Hisuse of a necessary pesticide is limited by federal regulations to 10 gallons for his entire 8 acres. Wheat requires 2 gallons of pesticide for every acre planted and barley requires just 1 gallon per acre. What is the maximum profit he can make? Solve graphically.

The Bead Store sells material for customers to make their own jewelry. Customer canselect beads from various bins. Grace wants to design her own Halloween necklace fromorange and black beads. She wants to make a necklace that is at least 12 inches long, butno more than 24 inches long. Grace also wants her necklace to contain black beads thatare at least twice the length of orange beads. Finally, she wants her necklace to have atleast 5 inches of black beads.Find the constraints, sketch the problem and find the vertices (intersection points).

UNIT 5

The mileage C in thousands of miles which car owners get with a certain kind of tyre is a Random variable having probability density function

𝑓(𝑥) = 1/20 𝑒𝑥20 𝑓𝑜𝑟 𝑥 > 0

= 0, 𝑓𝑜𝑟 𝑥 ≤ 0

Find the probabilities that one of these tyres will last

i. At most 10000 miles

ii. Anywhere from 16000 to 24000 miles

iii. At least 30000 miles

b. A petrol pump is supplied with petrol once a day. If its daily volume X of sales in thousands

Of litres is distributed by

𝑓(𝑥) = 5(1 − 𝑥)4, 0 ≤ 𝑥 ≤ 1

what must be the capacity of its tank in order that the probability that its supply will be

Exhausted in a given day shall be 0.01?

c. A continuous random variable X has a p.d.f.

𝑓(𝑥) = 3𝑥2, 0 ≤ 𝑥 ≤ 1

Find a and b such that

i. P(X ≤ a) = P(X > a) and

ii. P(X > b) = 0.05

What is the probability of getting a total of 9 (i) twice and (ii) at least twice in 6 tosses of a

Pair of dice?

In a precision bombing attack there is a 50% chance that any one bomb will strike the target.

Two direct hits are required to destroy the target completely. How many bombs must be?

Dropped to give a 99% chance or better of completely destroying the target?

A car hire firm has two cars which it fires out day by day. The number of demands for a car

On each day is distributed as Poisson variety with mean 1.5. Calculate the proportion of days

On which (i) neither car is used (ii) some demand is refused.

The diameter of an electric cable; say X, is assumed to be a continuous random variable with p.d. f. 𝑓 ( 𝑥 ) = 6𝑥 ( 1 − 𝑥), 0 ≤ 𝑥 ≤ 1.

(i) Check that above is p.d.f,

(ii) Determine a number b such that P (X < b) = P (X> b)

Define and explain the concept of probability density function.

The probability mass function of a random variable X is zero except at the points 𝑖 = 0, 1,2.

At these points it has the values 𝑝 (0) = 3𝑐3, 𝑝(1) = 4𝑐 − 10𝑐 2, 𝑝(2) = 5𝑐 − 1 for some 𝑐 > 0.

(i) Determine the value of c.

(ii) Compute the following probabilities, 𝑃 (𝑋 < 2) 𝑎𝑛𝑑 𝑃 (1 < 𝑋 ≤ 2).

(iii) Describe the distribution function and draw its graph.

(iv) Find the largest x such that 𝐹 (𝑥) < 1

(v) Find the smallest x such that 𝐹 (𝑥) ≥ 1

What is exponential distribution? Suppose the time till death after infection with Cancer, is

exponentially distributed with mean equal to 8 years. If X represents the time till death after infection with Cancer, then find the percentage of people who die within five years after infection with Cancer.

The price for a litre of whole milk is uniformly distributed between Rs. 45 and Rs. 55 during July in Mumbai. Give the equation and graph the pdf for X, the price per litre of whole milk during July. Also determine the percent of stores that charge more than Rs. 54 per litre.

The monthly worldwide average number of airplane crashes of commercial airlines is 2.2. What is the probability that there will be (i) more than 2 such accidents in the next month? (ii) more than 4 such accidents in the next 2 months?