From fa87d5bb2410c4b63a7cde5345a2d1b1ae74e0c5 Mon Sep 17 00:00:00 2001 From: Durga Bachhawat <157206276+itschikki@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:14:16 +0530 Subject: [PATCH 1/5] Update Web Devlopment answers html Answers of Html --- Web Devlopment answers | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Web Devlopment answers b/Web Devlopment answers index 881ac4f..ff97d45 100644 --- a/Web Devlopment answers +++ b/Web Devlopment answers @@ -1 +1,28 @@ ADD Web Development Answers here. +ANSWERS OF HTML: + + + + +

+

Text in a pre element
+ is displayed in a fixed-width
+ font, and it preserves
+ both spaces and
+ line breaks

+

+ + New Tab Link. + + +
+ +
+ +
+ + From b6f29faa28d8ff660bf9da20ee1b8725afa5b13f Mon Sep 17 00:00:00 2001 From: Durga Bachhawat <157206276+itschikki@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:23:26 +0530 Subject: [PATCH 2/5] Update Web Devlopment answers Js --- Web Devlopment answers | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Web Devlopment answers b/Web Devlopment answers index ff97d45..42c9760 100644 --- a/Web Devlopment answers +++ b/Web Devlopment answers @@ -26,3 +26,23 @@ ANSWERS OF HTML:
  • tea
  • milk
  • +ANSWERS OF JAVASCRIPT: +// 1. + let x = document.getElementById("demo"); +// 2. + let btn = document.querySelector('button'); + btn.addEventListener('click', function(){ + alert("You clicked me!"); + }); +// 3. + setTimeout(function() {console.log("Hello")}, 2000); +//4. + 2 + 4 + 3 + 1 + +// 5. +for (let i in myObject) { + console.log(Key: ${i} Value: ${myObject[i]}); + } From bc928d64464289a002c07aa1b503f0308d33c800 Mon Sep 17 00:00:00 2001 From: Durga Bachhawat <157206276+itschikki@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:47:30 +0530 Subject: [PATCH 3/5] Update CP answers --- CP answers | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/CP answers b/CP answers index c0e55e6..bcd1bae 100644 --- a/CP answers +++ b/CP answers @@ -1 +1,93 @@ ADD Competitive Programming answers here. +Question 1) + int A=5,B=7; + int multiplyAB = A * B ; + System.out.println("The product of "+A+" and "+B+ " is : + "+multiplyAB); +Question 2) + int num = 9; + if (num%2==0) { + System.out.println(num +" is Even Number"); + } + else{ + System.out.println(num +" is Odd Number"); + + } +Question 3) + int n = 6; + long fact = 1; + for (int i = 1; i <=n; i++) { + fact =fact*i; + } + System.out.println("Factorial of"+n+"is="+fact); + } +Question 3) + int n = 6; + long fact = 1; + for (int i = 1; i <=n; i++) { + fact =fact*i; + } + System.out.println("Factorial of"+n+"is="+fact); + } +Question 4) + String str ="MBM University"; + int count = 0; + char ch; + for (int i = 0; i arr[i]) + min=arr[i]; + }System.out.println("Minimum element in Array is: "+min); +Question 7) + int A=10; + int B=5; + System.out.println("Before Swapping"); + System.out.println("A = " + A); + System.out.println("B = " + B); + System.out.println("After Swapping"); + int temp = A; + A = B; + B = temp; + System.out.println("A = " + A); + System.out.println("B = " + B); +Question 8) + int yr=2000; + if((yr%4==0 && yr%100!=0) || + (yr%400==0)) + System.out.println(yr+" is Leap Year"); + else{ + System.out.println(yr+" is Not Leap Year"); + } +Question 9) + String s="Helloooo"; + char c[]=s.toCharArray(); + int n=c.length; + for(int i=0,j=n-1;i Date: Wed, 24 Jan 2024 15:52:30 +0530 Subject: [PATCH 4/5] Update CP answers --- CP answers | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CP answers b/CP answers index bcd1bae..6f5c90a 100644 --- a/CP answers +++ b/CP answers @@ -87,6 +87,19 @@ Question 10) System.out.println("Maximum number among the three numbers is :"+ max_ of_three); } +Answers of MCQ +Q1) + D) O(1) +Q2) +A) Queue +Q3) +B) Exit the loop +Q4) +A) Must be sorted +Q5) +B) The number of operations it performs + + From 70f9e87e28b0af5bd2ac99b29d2e8e1e83a94731 Mon Sep 17 00:00:00 2001 From: Durga Bachhawat <157206276+itschikki@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:54:38 +0530 Subject: [PATCH 5/5] Update AI answers --- AI answers | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/AI answers b/AI answers index a56b0fb..9030519 100644 --- a/AI answers +++ b/AI answers @@ -1 +1,64 @@ ADD Artificial Intelligence answers here. +ANSWERS OF PYTHON: +# 1 +def is_prime(num): + """Check if the input number is prime.""" + if num <= 1: + return False + elif num == 2: + return True + else: + for i in range(2, int(num ** 0.5) + 1 + ): + if num % i == 0: + return False + return True + +#2 + + def reverse_string(input_string): + return input_string[::-1] + +#3 + import pandas as pd +data = {'Name': ['Alice', 'Bob'], + 'Age': [25, 30]} +df = pd.DataFrame(data) +print(df) + +#4 +import numpy as np +matrix = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) + +print(matrix) + +#5 +dictionary = {'zebra': 1, 'apple': 2, 'banana': 3, 'mango': 4} +print(alphabetical_keys(dictionary)) + +def alphabetical_keys(dictionary): + keys = list(dictionary.keys()) + keys.sort() + return keys + +#6 +def factorial(n): + if n == 0: + return 1 + else: + return n * factorial(n-1) + +print(factorial(5)) + +#7 +arr = np.array([1, 2, 3, 4, 5]) +mean = np.mean(arr) +std_dev = np.std(arr) +print("Mean is :", mean) +print("Standard Deviation is :", std_dev) + +#8 +import pandas as pd +df = pd.DataFrame(df_data, columns=['A', 'B']) +sum_of_A = df.loc[df['B'] > 10, 'A'].sum() +print(sum_of_A)