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

Add files via upload #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class SciencePoem {
public static void main(String[] args) {
//Write your code here
//Pay attention to the new line and the ending characters.

System.out.println("In the realm of atoms and galaxies,\nWhere mysteries unfurl like cosmic seas,\nScience, our guiding star so bright,\nReveals the universe, its boundless light.\n");
System.out.println("From microcosms to celestial grace,\nInquiring minds explore every space,\nIn the quest for knowledge, we stand tall,\nScience, the greatest adventure of all.");
}
}
5 changes: 5 additions & 0 deletions Week1/A-Introduction to Java/CorrectTheCode.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class Solution {
public static void main(String[] args){
System.out.println("You have successfully removed the error");
}
}
7 changes: 7 additions & 0 deletions Week1/A-Introduction to Java/Print.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class HelloWorld {
public static void main(String[] args){

//Modify this statement
System.out.println("I learnt tricks");
}
}
8 changes: 8 additions & 0 deletions Week1/A-Introduction to Java/PrintMoreLines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
public class SampleProgram {
public static void main(String[] args){
//Write your code below

System.out.print("I'm learning Java.\nJava is an object-oriented programming language.");

}
}
5 changes: 5 additions & 0 deletions Week1/A-Introduction to Java/RemoveError.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class HelloWorld {
public static void main(String[] args){
System.out.println("You have successfully removed the main method error");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
public class DebugAndPrintLiterals {
public static void main(String[] args) {
//Write your code here

//Declare and initialize the variables with proper literal representation
int a=26;
float f=3.1415f;
double d=23.411;
String s="WritingCleanerCode";
System.out.println(a);
System.out.println(f);
System.out.println(d);
System.out.println(s);



//Print each literal value in new line.



}
}
16 changes: 16 additions & 0 deletions Week1/B-Fundamentals of Java/Assignment1b/LowerCase.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
public class ConvertToLowerCase{
public static void main(String[] args) {

String upperCaseString = "I AM LEARNING FUNDAMENTALS OF JAVA";

//Convert the above given string into all lowercase using wrapper class method of String
//Use inbuilt feature of String .toLowerCase()
String res=upperCaseString.toLowerCase();
System.out.println(res);


//Print the newly converted lower case string.


}
}
14 changes: 14 additions & 0 deletions Week1/B-Fundamentals of Java/Average.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

public class Solution
{
public static void main(String[] args) {

int a = 10 ;
int b = 20 ;
int c = 30 ;
// write your code logic and print the result ..
int sum=a+b+c;
int average=sum/3;
System.out.println(average);
}
}
12 changes: 12 additions & 0 deletions Week1/B-Fundamentals of Java/SumOfTwoNumbers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

public class Solution
{
public static void main(String[] args) {

int a = 10 ;
int b = 20 ;
// write your code logic and print the result ..
System.out.println(a+b);

}
}