diff --git a/task1.py b/task1.py new file mode 100644 index 0000000..c5ee709 --- /dev/null +++ b/task1.py @@ -0,0 +1,10 @@ +def case(x): + u=4 + for i in range (1,x+1): + print("*"*i) + print("----------") + for i in range (1,x+1): + print(" "*u,"*"*i,"*"*i) + u=u-1 +x=eval(input("Enter the size of the Staircase: ")) +case(x) diff --git a/task2.java b/task2.java new file mode 100644 index 0000000..de6b726 --- /dev/null +++ b/task2.java @@ -0,0 +1,16 @@ +import java.util.Scanner; +public class task2 { + public static void main(String[] args){ + Scanner enter=new Scanner(System.in); + System.out.println("Enter the first number"); + int first= enter.nextInt(); + System.out.println("Enter the second number"); + int second= enter.nextInt(); + if(first>second) + System.out.println(first+" is grater than "+second ); + else if(second>first) + System.out.println(second+" is grater than "+first ); + else + System.out.println("The two numbers are equal"); + } +}