Wednesday, November 20, 2024

ADA All Practical Solution With Screenshot

ANALYSIS AND DESIGN OF ALGORITHMS (3150703)

Degree Engineering

Branch= COMPUTER ENGINEERING, CSE, IT

Semester= 05


ADA All Practical Solution With Screenshot

Link= https://drive.google.com/file/d/1Kl6Z0trokiHnk8BBmZgWsl-UlhsGl40_/view?usp=sharing


Find all the Practical Solution of given subject on above link.


#ADA  #Algorithm  #Analysis  #GTU  #Computer

Friday, March 11, 2022

DV Lab -3-H- Develop Following Program Using HTML5 and JavaScript

GTU DV Lab -3- Develop Following Program Using HTML5 and JavaScript


3-H- Read JSON Data and draw Data Table

File Name-1= DV Lab3h JavaScript Bar Charts json1.html
Program Code:

<!DOCTYPE HTML>
<html>
<head>
  <script type="text/javascript">
  window.onload = function () {
    var chart = new CanvasJS.Chart("chartContainer", {            
      title:{
        text: "GTU DV LAB-3-H-Fruits sold in First & Second Quarter"              
      },

      data: [  //array of dataSeries     
      { //dataSeries - first quarter
   /*** Change type "column" to "bar", "area", "line" or "pie"***/        
       type: "column",
       name: "First Quarter",
       dataPoints: [
       { label: "banana", y: 58 },
       { label: "orange", y: 29 },
       { label: "apple", y: 80 },                                    
       { label: "mango", y: 74 },
       { label: "grape", y: 64 }
       ]
     },
     { //dataSeries - second quarter

      type: "column",
      name: "Second Quarter",                
      dataPoints: [
      { label: "banana", y: 63 },
      { label: "orange", y: 73 },
      { label: "apple", y: 88 },                                    
      { label: "mango", y: 77 },
      { label: "grape", y: 60 }
      ]
    }
    ]
  });

    chart.render();
  }
  </script>
  <script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</head>
<body>
  <div id="chartContainer" style="height: 300px; width: 100%;">
  </div>
</body>
</html>



Output:








DV Lab -3-G- Develop Following Program Using HTML5 and JavaScript

GTU DV Lab -3- Develop Following Program Using HTML5 and JavaScript



3-G- Read the data XML file and draw Simple Chart

File Name-1= DV Lab3-g draw Data Table.html
Program Code:

<!DOCTYPE html>
<html>
<head>
  <title>Chart using XML Data</title>
  <script type="text/javascript" src="https://canvasjs.com/assets/script/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
  <script type="text/javascript">
  window.onload = function() {
var dataPoints = [];
$.get("https://canvasjs.com/services/data/datapoints.php?xstart=5&ystart=10&length=10&type=xml", function(data) {
$(data).find("point").each(function () {
var $dataPoint = $(this);
var x = $dataPoint.find("x").text();
var y = $dataPoint.find("y").text();
dataPoints.push({x: parseFloat(x), y: parseFloat(y)});
});
var chart = new CanvasJS.Chart("chartContainer", {
title: {
    text: "GTU DV LAB-3-G-Chart Using XML Data",
},
data: [{
    type: "column",
    dataPoints: dataPoints,
  }]
});
chart.render();
});
  }
  </script>
</head>
<body>
<div id="chartContainer" style="width:100%; height:300px;"></div>
</body>
</html>



Here we have to write 2-files.
Second file is XML file which is shown below.

File Name-2= DV Lab3-g XML file.xml
Program Code:
<?xml version="1.0"?>
<data>
<point>
<x>5</x>
<y>8</y>
</point>
<point>
<x>6</x>
<y>7</y>
</point>
<point>
<x>7</x>
<y>10</y>
</point>
<point>
<x>8</x>
<y>15</y>
</point>
<point>
<x>9</x>
<y>16</y>
</point>
<point>
<x>10</x>
<y>21</y>
</point>
<point>
<x>11</x>
<y>22</y>
</point>
<point>
<x>12</x>
<y>26</y>
</point>
<point>
<x>13</x>
<y>29</y>
</point>
<point>
<x>14</x>
<y>27</y>
</point>
</data>



Output:






DV Lab -3-F- Develop Following Program Using HTML5 and JavaScript

GTU DV Lab -3- Develop Following Program Using HTML5 and JavaScript



3-F- Read the data XML file and draw Data Table

File Name-1= DV Lab3-f draw Data Table.html
Program Code:

<!DOCTYPE html>
<html>
<head>
  <title>Chart using XML Data</title>
  <script type="text/javascript" src="https://canvasjs.com/assets/script/jquery-1.11.1.min.js"></script>
  <script type="text/javascript" src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
  <script type="text/javascript">
  window.onload = function() {
var dataPoints = [];
$.get("https://canvasjs.com/services/data/datapoints.php?xstart=5&ystart=10&length=10&type=xml", function(data) {
$(data).find("point").each(function () {
var $dataPoint = $(this);
var x = $dataPoint.find("x").text();
var y = $dataPoint.find("y").text();
dataPoints.push({x: parseFloat(x), y: parseFloat(y)});
});
var chart = new CanvasJS.Chart("chartContainer", {
title: {
    text: "GTU DV LAB-3-f-Chart Using XML Data",
},
data: [{
    type: "column",
    dataPoints: dataPoints,
  }]
});
chart.render();
});
  }
  </script>
</head>
<body>
<div id="chartContainer" style="width:100%; height:300px;"></div>
</body>
</html>



Here we have to write 2-files.
Second file is XML file which is shown below.

File Name-2= DV Lab3-f XML file.xml
Program Code:
<?xml version="1.0"?>
<data>
<point>
<x>5</x>
<y>8</y>
</point>
<point>
<x>6</x>
<y>7</y>
</point>
<point>
<x>7</x>
<y>10</y>
</point>
<point>
<x>8</x>
<y>15</y>
</point>
<point>
<x>80</x>
<y>16</y>
</point>
<point>
<x>20</x>
<y>23</y>
</point>
<point>
<x>11</x>
<y>22</y>
</point>
<point>
<x>12</x>
<y>26</y>
</point>
<point>
<x>13</x>
<y>29</y>
</point>
<point>
<x>45</x>
<y>27</y>
</point>
</data>



Output:





DV Lab -3-A & C- Develop Following Program Using HTML5 and JavaScript

GTU DV Lab -3- Develop Following Program Using HTML5 and JavaScript



3-A- Develop the simple bar chart usingTML5 CANVAS

File Name= DV Lab3a JavaScript Bar Charts.html
Program Code:

<!DOCTYPE HTML>
<html>
<head>  
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true,
title:{
text:"GTU DV Lab-3-a-Fortune 500 Companies by Country"
},
axisX:{
interval: 1
},
axisY2:{
interlacedColor: "rgba(1,77,101,.2)",
gridColor: "rgba(1,77,101,.1)",
title: "Number of Companies"
},
data: [{
type: "bar",
name: "companies",
axisYType: "secondary",
color: "#014D65",
dataPoints: [
{ y: 3, label: "Sweden" },
{ y: 7, label: "Taiwan" },
{ y: 5, label: "Russia" },
{ y: 9, label: "Spain" },
{ y: 7, label: "Brazil" },
{ y: 7, label: "India" },
{ y: 9, label: "Italy" },
{ y: 8, label: "Australia" },
{ y: 11, label: "Canada" },
{ y: 15, label: "South Korea" },
{ y: 12, label: "Netherlands" },
{ y: 15, label: "Switzerland" },
{ y: 25, label: "Britain" },
{ y: 28, label: "Germany" },
{ y: 29, label: "France" },
{ y: 52, label: "Japan" },
{ y: 103, label: "China" },
{ y: 134, label: "US" }
]
}]
});
chart.render();

}
</script>
</head>
<body>
<div id="chartContainer" style="height: 400px; width: 100%;"></div>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
</html>

Output:





3-C- Read the data .txt file and draw Simple Bar Chart

File Name= DV Lab3c JavaScript Bar Charts.html
Program Code:

<!DOCTYPE HTML>
<html>
<head>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
<script type="text/javascript">

window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
title:{
text: "GTU DV LAB-3-c-My First Chart in CanvasJS"              
},
data: [              
{
// Change type to "doughnut", "line", "splineArea", etc.
type: "column",
dataPoints: [
{ label: "apple",  y: 50  },
{ label: "orange", y: 15  },
{ label: "banana", y: 25  },
{ label: "mango",  y: 90  },
{ label: "grape",  y: 28  }
]
}
]
});
chart.render();
}
</script>
</head>
<body>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
</body>
</html>


Output:




Tuesday, February 8, 2022

PPS (3110003) Assignment of All Chapter

PPS (3110003) Assignment

Programming for Problem Solving(PPS)       

Degree Engineering

Branch= ALL ENGINEERING BRANCH OF GTU

Year = 1st Year

Subject Code: 3110003



PPS (3110003) Assignment of All Chapter


Chapter-1: Introduction to Computer and Programming

1. Draw and explain the block diagram of Computer System. 

2. What is Software and Hardware? Explain different types of Software. 

3. Explain the concept of machine level, assembly level and high-level programming.  

4. Recall the definitions of (I) Assembler (II) Compiler (III) Interpreter 

5. Define algorithm Explain flowchart with suitable example. 

6. Write an algorithm and draw a flowchart to print first N Fibonacci numbers.


Chapter-2: Fundamentals of ‘C’

7. Explain basic structure of C program. 

8. List and explain fundamental data types of ‘C’ language. 

9. Explain different types of operators used in the C language with their precedence and associativity. 

10. Describe different types of constants used in C. 

11. What is difference between keywords and identifiers? Explain rules for naming an identifier. 

12. What is type conversion and type casting? List and explain type conversion supported by C language with example.

13. Explain formatted input output with example.

14. Write a program to print fibonacci series of given number.


Chapter-3: Control Structures in ‘C’

15. Explain different types of loop statements with flowchart and example

16. Discuss general form of following decision – making statements. (I) BREAK (II) GOTO (III) CONTINUE (IV) SWITCH 

17. Write a program to find sum of first N odd numbers. Ex. 1+3+5+7+………..+N.

18. Write a C Program to check whether the given number is prime or not. 

19. Write a C Program to find factorial of given number. 

20. Write a C Program to check whether the input character is vowel or not vowel. 

21. Write a program to print following pattern.

Pattern-1: 

0 1

 1 0 1

 0 1 0 1


Pattern-2:

#

# #

# # #

# # # #


Pattern-3:

1 2 3 4 5

1 2 3 4

1 2 3

1 2 

1

 

Chapter-4: Array and String 

22. What is array? Discuss declaration and initialization of one-dimensional and two-dimensional arrays with example. 

23. What is String? How are they declared and also define the null character? In how many ways can you accept data in a string? 

24. Write a program in c for multiplication of the two matrices

25. Write a program to check whether a given string is a palindrome or not. 

26. Explain following string manipulation functions. strcmp( ), strlen( ), strcat( ), strstr().

27.   Write a program to count total words in text. 

28. Write a program to reverse the input string without using string function. 

29. Write a program to accept a string and count the number of vowels present in a string.


Chapter-5 to 7: Functions, Recursion, Pointer

30. What is User defined function (UDF)? Explain pass by value and pass by reference in functions with example. 

31. Explain different components (elements) of User defined function. 

32. Create a function to swap the values of two variables. 

33. What is recursion? Explain recursive function with example. 

34. What is pointer and pointer to pointer? Write suitable example to demonstrate the concept. 


Chapter-8 to 10: Structure, Dynamic memory allocation, File management

35. Explain structure declaration and initialization with proper syntax. 

36. Write a difference between Structure and Union. 

37. Explain dynamic memory allocation(DMA) and different functions for DMA in detail. 

38. What is file and file management? Explain various file management functions used in C

39. Explain command line arguments with suitable example. 




Find the study material of given subject.

PPS (3110003)  GTU

PPS Assignment of All Chapter

PPS Question Bank GTU