Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sudarshanjadhav2 patch 9 #579

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
5686ec3
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
0621d1f
Merge pull request #67 from SUDARSHAN2171/SUDARSHAN2171-patch-67
SUDARSHANJADHAV2 Nov 10, 2024
faaa67e
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
5b169da
Merge pull request #68 from SUDARSHAN2171/SUDARSHAN2171-patch-68
SUDARSHANJADHAV2 Nov 10, 2024
4dd23e0
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
9c14524
Merge pull request #69 from SUDARSHAN2171/SUDARSHAN2171-patch-69
SUDARSHANJADHAV2 Nov 10, 2024
2c9f649
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
f5d2d0c
Merge pull request #70 from SUDARSHAN2171/SUDARSHAN2171-patch-70
SUDARSHANJADHAV2 Nov 10, 2024
c78db58
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
54c72bc
Merge pull request #71 from SUDARSHAN2171/SUDARSHAN2171-patch-71
SUDARSHANJADHAV2 Nov 10, 2024
f59adc2
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
2c7ccd7
Merge pull request #72 from SUDARSHAN2171/SUDARSHAN2171-patch-72
SUDARSHANJADHAV2 Nov 10, 2024
8cdc02a
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
c36742e
Merge pull request #73 from SUDARSHAN2171/SUDARSHAN2171-patch-73
SUDARSHANJADHAV2 Nov 10, 2024
e59528f
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
7daa985
Merge pull request #74 from SUDARSHAN2171/SUDARSHAN2171-patch-74
SUDARSHANJADHAV2 Nov 10, 2024
c2cb60e
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
8d8dd8c
Merge pull request #75 from SUDARSHAN2171/SUDARSHAN2171-patch-75
SUDARSHANJADHAV2 Nov 10, 2024
74ad4aa
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
f230823
Merge pull request #76 from SUDARSHAN2171/SUDARSHAN2171-patch-76
SUDARSHANJADHAV2 Nov 10, 2024
c6d846f
Added Code
SUDARSHANJADHAV2 Nov 10, 2024
3136424
Merge pull request #77 from SUDARSHAN2171/SUDARSHAN2171-patch-77
SUDARSHANJADHAV2 Nov 10, 2024
bff1c51
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
0743cae
Merge pull request #78 from SUDARSHAN2171/SUDARSHAN2171-patch-78
SUDARSHANJADHAV2 Nov 11, 2024
ade9008
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
b60ab71
Merge pull request #79 from SUDARSHAN2171/SUDARSHAN2171-patch-79
SUDARSHANJADHAV2 Nov 11, 2024
ffc3751
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
8fa5305
Merge pull request #80 from SUDARSHAN2171/SUDARSHAN2171-patch-80
SUDARSHANJADHAV2 Nov 11, 2024
2796b63
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
5107b34
Merge pull request #81 from SUDARSHAN2171/SUDARSHAN2171-patch-81
SUDARSHANJADHAV2 Nov 11, 2024
b2b07ad
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
e3f687b
Merge pull request #82 from SUDARSHAN2171/SUDARSHAN2171-patch-82
SUDARSHANJADHAV2 Nov 11, 2024
b400ba7
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
37f84b3
Merge pull request #83 from SUDARSHAN2171/SUDARSHAN2171-patch-83
SUDARSHANJADHAV2 Nov 11, 2024
ca1f10c
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
16e3948
Merge pull request #84 from SUDARSHAN2171/SUDARSHAN2171-patch-84
SUDARSHANJADHAV2 Nov 11, 2024
e1f160e
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
24c2637
Merge pull request #85 from SUDARSHAN2171/SUDARSHAN2171-patch-85
SUDARSHANJADHAV2 Nov 11, 2024
1a3de22
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
0394165
Merge pull request #86 from SUDARSHAN2171/SUDARSHAN2171-patch-86
SUDARSHANJADHAV2 Nov 11, 2024
502ae27
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
91fff6a
Merge pull request #87 from SUDARSHAN2171/SUDARSHAN2171-patch-87
SUDARSHANJADHAV2 Nov 11, 2024
931e00e
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
b820714
Merge pull request #88 from SUDARSHAN2171/SUDARSHAN2171-patch-88
SUDARSHANJADHAV2 Nov 11, 2024
87f57dc
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
9fd2a01
Merge pull request #89 from SUDARSHAN2171/SUDARSHAN2171-patch-89
SUDARSHANJADHAV2 Nov 11, 2024
11dda6b
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
7f45e2c
Merge pull request #90 from SUDARSHAN2171/SUDARSHAN2171-patch-90
SUDARSHANJADHAV2 Nov 11, 2024
7db8a40
Added Code
SUDARSHANJADHAV2 Nov 11, 2024
80c8466
Merge pull request #91 from SUDARSHAN2171/SUDARSHAN2171-patch-91
SUDARSHANJADHAV2 Nov 11, 2024
5a23317
Added Code
SUDARSHANJADHAV2 Nov 12, 2024
62935a6
Merge pull request #92 from SUDARSHAN2171/SUDARSHAN2171-patch-92
SUDARSHANJADHAV2 Nov 12, 2024
a151cc2
Added Code
SUDARSHANJADHAV2 Nov 12, 2024
9f55fc3
Merge pull request #93 from SUDARSHAN2171/SUDARSHAN2171-patch-93
SUDARSHANJADHAV2 Nov 12, 2024
84dc5df
Added Code
SUDARSHANJADHAV2 Nov 12, 2024
e8a753c
Merge pull request #94 from SUDARSHAN2171/SUDARSHAN2171-patch-94
SUDARSHANJADHAV2 Nov 12, 2024
400daaa
Added Code
SUDARSHANJADHAV2 Nov 12, 2024
d6ac852
Merge pull request #95 from SUDARSHAN2171/SUDARSHAN2171-patch-95
SUDARSHANJADHAV2 Nov 12, 2024
101cbfc
Added Code
SUDARSHANJADHAV2 Nov 12, 2024
cf354f0
Merge pull request #96 from SUDARSHAN2171/SUDARSHAN2171-patch-96
SUDARSHANJADHAV2 Nov 12, 2024
2a5c583
Create DefalutX-Points.py
SUDARSHANJADHAV2 Nov 15, 2024
c5d2338
Merge pull request #97 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-1
SUDARSHANJADHAV2 Nov 15, 2024
7421c44
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
f516bf9
Merge pull request #98 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-2
SUDARSHANJADHAV2 Nov 15, 2024
fad52ac
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
c91798a
Merge pull request #99 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-3
SUDARSHANJADHAV2 Nov 15, 2024
90960bf
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
072c60f
Merge pull request #100 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-4
SUDARSHANJADHAV2 Nov 15, 2024
b91bd09
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
0c1537e
Merge pull request #101 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-5
SUDARSHANJADHAV2 Nov 15, 2024
18f2875
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
5452fb1
Merge pull request #102 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-6
SUDARSHANJADHAV2 Nov 15, 2024
76c3506
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
1d56121
Merge pull request #103 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-7
SUDARSHANJADHAV2 Nov 15, 2024
2ac014d
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
71cdd8b
Merge pull request #104 from SUDARSHANJADHAV2/SUDARSHANJADHAV2-patch-8
SUDARSHANJADHAV2 Nov 15, 2024
3be2ba4
Added Code
SUDARSHANJADHAV2 Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions JAVA/Circumferance.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.util.Scanner;

public class Circumferance {

public static double circle(float r) {
double circum = 2 * 3.14 * r;
System.out.println("your circumfer" + circum);
return circum;
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
float r = sc.nextFloat();
circle(r);
}
}
17 changes: 17 additions & 0 deletions JAVA/ClearBit.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

//This code clears or sets a bit value to "0" at a particular position given by user
import java.util.*;

public class ClearBit {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter your number : ");
int no = sc.nextInt();
System.out.print("Enter the bit postion you want to clear : ");
int pos = sc.nextInt();
int bitMass = 1 << pos;
int notbitMass = ~bitMass;
int newnumber = notbitMass & no;
System.out.print("Your Final no. : " + newnumber);
}
}
18 changes: 18 additions & 0 deletions JAVA/Compare2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import java.util.*;

public class Compare2 {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
System.out.println("both are equal");
} else {
if (a >= b) {
System.out.println("a is greater then b");
} else {
System.out.println("b is greater then a");
}
}
}
}
34 changes: 34 additions & 0 deletions JAVA/Contains_Duplicate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import java.util.*;
import java.util.Scanner;

class Contains_Duplicate {
public boolean ContainsDuplicate(int[] nums) {
Set<Integer> s = new HashSet<>();
for (int num : nums) {
if (!s.add(num)) {
return true;
}
}
return false;
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the size of array :");
int size = sc.nextInt();
int[] nums = new int[size];
System.out.print("Enter the elements of array :");
for (int i = 0; i < size; i++) {
nums[i] = sc.nextInt();
}

Contains_Duplicate obj = new Contains_Duplicate();
if (obj.ContainsDuplicate(nums)) {
System.out.print("True"); // i.e it contains duplicate elements
} else {
System.out.print("False");// i.e it does not contains duplicate elements
}
sc.close();
}

}
60 changes: 60 additions & 0 deletions JAVA/DateToDay.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import java.util.*;

public class DateToDay {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int day, month, year;
System.out.println("Enter (dd mm yyyy) : ");
day = sc.nextInt();
month = sc.nextInt();
year = sc.nextInt();
int day_in_month[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

// to check wheather the inputed year is a leap or not and make changes
// according to it
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
day_in_month[2] = 29;
}

// check weather input is valid or not
if (day < 1 || day > day_in_month[month]) {
System.out.print("The Day must range for 1 - " + day_in_month[month]);
return;
}

if (month < 1 || month > 12) {
System.out.print("The Month must range from 1 - 12");
}
// total day passes in month also in year
int passed_days = day;
for (int i = 1; i < month; i++) {
passed_days += day_in_month[i];
}
// total day till this year
int total_days = (year - 1) * 365 + (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400 + passed_days;
int odd_day = total_days % 7;
switch (odd_day) {
case 0:
System.out.println("Sunday");
break;
case 1:
System.out.println("Monday");
break;
case 2:
System.out.println("Tuesday");
break;
case 3:
System.out.println("Wednesday");
break;
case 4:
System.out.println("Thursday");
break;
case 5:
System.out.println("Friday");
break;
case 6:
System.out.println("Saturday");
break;
}
}
}
20 changes: 20 additions & 0 deletions JAVA/DiamondPattern.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

//not complete
import java.util.*;

public class DiamondPattern {
public static void main(String[] args) {
int n = 5;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
if (j <= i) {
System.out.print("*");
} else {
System.out.print(" ");
}
}

System.out.println();
}
}
}
13 changes: 13 additions & 0 deletions JAVA/EvenOdd.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import java.util.*;

public class EvenOdd {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
if (number % 2 == 0) {
System.out.println("even");
} else {
System.out.println("odd");
}
}
}
18 changes: 18 additions & 0 deletions JAVA/Factorial.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import java.util.*;

public class Factorial {
public static void Factorial(int a) {
int fact = 1;
for (int i = a; i >= 1; i--) {
fact = fact * i;
}
System.out.println(fact);
return;
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
Factorial(a);
}
}
21 changes: 21 additions & 0 deletions JAVA/Floydstriangle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

import java.util.*;

public class Floydstriangle {
public static void main(String[] args) {
int n = 5;
int m = 1;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= n; j++) {
if (j <= i) {
System.out.print(m + " ");
m++;
} else {
System.out.print("");
}

}
System.out.println();
}
}
}
32 changes: 32 additions & 0 deletions JAVA/GCD.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import java.util.*;

public class GCD {
public static void GCD(int a, int b) {
if (a % b == 0) {
System.out.println("The GCD : " + b);
} else {
if (b % a == 0) {
System.out.println("The GCD : " + a);
} else {
if (a != b) {
if (a > b) {
a = a - b;
System.out.println("The GCD : " + a);
} else {
if (b > a) {
b = b - a;
System.out.println("The GCD : " + b + b);
}
}
}
}
}
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
GCD(a, b);
}
}
9 changes: 9 additions & 0 deletions JAVA/Output.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import java.util.*;

public class Output {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String name = sc.nextLine();
System.out.println(name);
}
}
18 changes: 18 additions & 0 deletions JAVA/PowerFunction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import java.util.*;

public class PowerFunction {
public static void power(int x, int n) {
int result = 1;
for (int i = 1; i <= n; i++) {
result = result * x;
}
System.out.println("result :" + result);
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int n = sc.nextInt();
power(x, n);
}
}
16 changes: 16 additions & 0 deletions JAVA/ProductCalculator.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import java.util.*;

public class ProductCalculator {
public static int productCal(int a, int b) {
int product = a * b;
return product;
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int product = productCal(a, b);
System.out.println(product);
}
}
18 changes: 18 additions & 0 deletions JAVA/ReversePyramid.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

import java.util.*;

public class ReversePyramid {
public static void main(String[] args) {
int l = 4;
int b = 4;
for (int i = 1; i <= l; i++) {
for (int j = 1; j <= b; j++) {
if (i <= j) {
System.out.print("*");
}
System.out.print(" ");
}
System.out.println();
}
}
}
Empty file added JAVA/RomanToInteger.java
Empty file.
44 changes: 44 additions & 0 deletions JAVA/SB.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
public class SB {
public static void main(String args[]) {
// String name = "Sudarshan";
StringBuilder name = new StringBuilder("Sudarshan");
System.out.println(name);

// add at the begin of string
name.insert(0, "U");
System.out.println(name);

// Delete any letter in string eg:r
name.deleteCharAt(5);
System.out.println(name);

// replace charater at index
name.setCharAt(1, 'a');
System.out.println(name);

// add at the end of string
name.append(' ');
System.out.println(name);
name.append("Jadhav");
System.out.println(name);

// Reverse string
name.reverse();
System.out.println(name);

// OR
for (int i = 0; i < name.length() / 2; i++) {
int front = i;
int back = name.length() - 1 - i;

char frontchar = name.charAt(front);
char backchar = name.charAt(back);

name.setCharAt(front, backchar);
name.setCharAt(back, frontchar);

}
System.out.println(name);
}

}
Loading