diff --git a/Java_Beginners/56_javaBeginners.java b/Java_Beginners/56_javaBeginners.java index f4b1c29..82d7063 100644 --- a/Java_Beginners/56_javaBeginners.java +++ b/Java_Beginners/56_javaBeginners.java @@ -3,6 +3,7 @@ public class food{ void eat(){ System.out.println(" this food is great"); + } } //tuna.java file @@ -10,6 +11,7 @@ void eat(){ public class tuna extends food{ void eat(){ System.out.println(" this tuna is great"); + } } //potpie.java file @@ -28,12 +30,14 @@ public void digest(food x){ } } //apples.java file -public static void main(String[] args) -{ - fatty bucky = new fatty(); - food fo = new food(); - food po = new potpie(); +public class driver{ + public static void main(String[] args) + { + fatty bucky = new fatty(); + food fo = new food(); + food po = new potpie(); - bucky.digest(fo); - bucky.digest(po); -} \ No newline at end of file + bucky.digest(fo); + bucky.digest(po); + } +} diff --git a/Python/09_python.py b/Python/09_python.py index d958ae3..39ca1c3 100644 --- a/Python/09_python.py +++ b/Python/09_python.py @@ -1,17 +1,17 @@ #from 0 to 10 -for x in range(10): +for x in range(10): #it will print from 0 to 9. print(x) print("") #from 5 to 12 -for x in range(5, 12): +for x in range(5, 12): #it will print from 5 to 11. It is one less than the final number mentioned. print(x) print("") #from 10 to 40 increment value 5 -for x in range(10, 40, 5): +for x in range(10, 40, 5): #it will print from 10 to 35. print(x) print("") @@ -22,4 +22,4 @@ while(buttcrack < 10): print(buttcrack) - buttcrack += 1 \ No newline at end of file + buttcrack += 1 diff --git a/Python/10_python_challenge.py b/Python/10_python_challenge.py index 1ecefb0..9a0b622 100644 --- a/Python/10_python_challenge.py +++ b/Python/10_python_challenge.py @@ -1,5 +1,5 @@ #Challenge -#Find the numbers whıch can dive 4 and 4 multiple(tetragenous) in from 0 to 100 +#Find the numbers from 0 to 100(inclusive) which are a multiple of 4 for n in range(101): - if(n % 4 is 0): - print(n) \ No newline at end of file + if(n % 4 == 0): + print(n) diff --git a/Python/20_python.py b/Python/20_python.py index 83f0c40..73d0b89 100644 --- a/Python/20_python.py +++ b/Python/20_python.py @@ -1,3 +1,4 @@ +#illustration of dictionary in python classmates = {'Tony': ' cool but smells', 'Emma': ' sits behind me', 'Lucy': ' asks too many questions'} for k, v in classmates.items(): diff --git a/README.md b/README.md index 20a0a12..0fad3d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -####Source Code from thenewboston Tutorials +## Source Code from thenewboston Tutorials We are in the process of adding the source code from all of the tutorials to a public GitHub repository. If anyone would like to contribute, please feel free! @@ -10,7 +10,7 @@ DigitalOcean: https://docs.google.com/document/d/1xOllgXRN10fWz1TsURh0OYI60TAVz0 *** -#####How to Submit Source Code +### How to Submit Source Code 1 - Download [GitHub for Windows](https://windows.github.com/) or [GitHub for Mac](https://mac.github.com/)