Posts

Java String Manipulation 28th Jan Practice 2 - input a string and check whether it is a palindrome or not

Image
Palindrome is a number or a string which when reversed is the same as the original.  import java.util.*; class Main {     public static void main(String[] args) { Scanner in = new Scanner(System.in); String s,s1=""; char ch; System.out.println("Enter a String"); s = in.next(); int l = s.length(); s = s.toUpperCase(); for(int i=l-1; i>=0; i--){     ch = s.charAt(i);     s1 = s1+ch; } System.out.println(s1); if(s1.equals(s)){     System.out.println("Palindrome");      } else System.out.println("Not a palindrome");     } }

Java String Manipulation 28th Jan Practice 1 - to accept a character and check whether it is a letter or not. If letter, then convert it to uppercase or lowercase. Also check whether it is letter or a special character

Image
Java Program to accept a character and check whether it is a letter or not. If letter, then convert it to uppercase or lowercase. Also check whether it is letter or a special character import java.util.*; class Main {     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         char a;         System.out.println("Enter a character");         a = in.next().charAt(0);         if(Character.isLetter(a)){             System.out.println("Character "+ a+ " is letter");             if(Character.isUpperCase(a)){                 System.out.println(Character.toLowerCase(a));             }             else             System.out.println(Character.toUpperCase(a)); ...

Java Recursion Program Practise 5 - to input a number and print the sum of digits of the number

Image
Java Program to input a number and print the sum of digits of the number using Recursive Function import java.util.*; class Main {    int digit(int n){        if(n==0)        return 0;        else        return (n%10+digit(n/10));    }     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a;         System.out.println("Enter the number whose sum of digit is desired using Recursive function");         a = in.nextInt();         Main ob = new Main();         System.out.println(ob.digit(a));                       } }

Java Recursion Program Practise 4 - to input a number and display sum from 1 to that number

Image
Java Program to input a number and display sum from 1 to that number using Recursion import java.util.*; class Main {     int add(int n){         if(n>0){             return (n + add(n-1));         }         else         return 0;     }     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a;         System.out.println("Enter the number of which the sum is desired from 1 to the number n");         a = in.nextInt();         Main ob = new Main();       System.out.println( ob.add(a));              } }

Java Recursion Program Practise 3 - Raising base to power of index

Image
Java Program to input two number and raising the input number to the power of the another input using Recursive Function.  import java.util.*; class Main {     int power(int n, int p){         if(p==0)         return 1;         else {             return (n* power(n,p-1));         }     }     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a, b;         System.out.println("Enter the number and the power to be raised using Recursion Function");          a = in.nextInt();         b = in.nextInt();         Main ob = new Main();         System.out.println(ob.power(a,b));              } }

Java Recursion Program Practise 2 - Fibonacci Series

Image
Java program to find the given term of Fibonacci Series using Recursion Function import java.util.*; class Main {          int fib(int n){         if(n==1){         return 0;         }         if(n==2){         return 1;         }         if(n>2){             return(fib(n-2)+fib(n-1));         }         else         return -1;     }     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a;         System.out.println("Enter the number of terms of Fibonacci series to be displayed using Recursion function");         a = in.nextInt();         Main ob = new Main();   ...

Java Recursion Program Practise 1 - Factorial

Image
Java Program to find Factorial of given number using Recursion import java.util.*; class Main {          int fact(int n){         if(n==0)         return 1;         else{             return(n*fact(n-1));         }     }     public static void main(String[] args) {         Scanner in = new Scanner(System.in);         int a;         System.out.println("Enter a number to get the factorial with the help of recursion");         a = in.nextInt();         Main ob = new Main();        System.out.println(ob.fact(a));                                } }

Class 11th Final Term Maths Test

Image
It was a few days ago when my class teacher announced that the following week class tests will be conducted. It did not caught us out of blue as we had already expected it, but the thing that surprised us was the syllabus and schedule for the test. We had no breaks between the tests since the school decided to conduct all the tests in a single week. Somedays we had to prepare for two subjects.  The syllabus was so vast that it was almost impossible to cover in a few days. All the main subjects including Physics, Chemistry and Maths had 2 chapters and these were the chapters that I had never even read before. There was a chapters in Maths called Limits and Derivatives, which I was hearing about for the first time. When I first opened my Maths book and looked at the chapter, it almost panicked me. There were all types of new symbols and strange equations which I had no idea how to solve. I decided it would be a waste of time to understand this completely new chapter all by myself, so...

One word essay: Pride

Image
One word essay: Pride Pride is the feeling of confidence and self-respect that one gets after accomplishing a major achievement. The feeling of pride, though common to every sapience being, can be found excessively in ambitious men and women. Whether it is a great warrior, a craftsman, an artist, a scholar or a king, they all have one feeling in common, which is their desire to take a great pride in their work, postion or wisdom. In most cases, the pride of a being is the major driving factor which motivates him to pursue his goals and reach greater heights. Without pride, the competition will be significantly reduce and the ambition will no longer exist. In our daily lives, the student compete with each other to get the award for the most brilliant. The researchers competes to make the greatest discoveries. The companies competes to make the best product and attract consumers. The writers compete to give birth to the greatest of human imagination and the countries compete to be the mi...

The main scale of vernier calliper is calibrated in mm and 19 divisions of main scale are equal in length to 20 divisions of vernier scale. In measuring the diameter of a cylinder by this instrument, the main scale reads 35 division and 4th division of vernier scale coincides with a M.S.D. Find LC in (cm).

Image
Question    Solution Question from PW 2023-24 Physics Module Concept Application Page 39 Question No. 29.

The diameter of a cylinder is measured using a vernier callipers with no zero error. It is found that, the zero of the vernier scale lies between 5.10 cm and 5.15 cm of the main scale. The vernier scale has 50 division equivalent to 2.45 cm. If 24th division of the vernier scale exactly coincides with one of the main scale division, the diameter of the cylinder is

Image
  Solution Question This question is from PW Module 2023-2024 edition page no. 39, Question 28 from Concept Application. 

Abhisara - the Tryst Notes

Image
Upagupta, the disciple of Buddha, lay asleep in the dust by thr city wall of Mathura. Lamps were all out, doors were all shut, ans stars were all hidden by the murky sky of August. Whose feet were those tinkling with anklets, touching his breast of a sudden? He woke up startled, and the light from a woman's lamp fell on his forgiving eyes. It was Vasavadatta the dancing girl, starred with jewels, Clouded with a pale blue mantle, drunk with the wine of her youth. She lowered her lamp and saw the young face, austerely beautiful. 'Forgive me, young ascetic,' said the woman, 'Graciously come to my house. The dusty earth is not a fit bed for you.' The young ascetic answered, 'Woman, go on your way; When the time is ripe I will come to you.' Suddenly the black night showed its teeth in a flash of lightning.  The storm growled from the corner of the sky, and the woman trembled in fear. A year had not yet passed. It was eveing of a day in April, in the Spring. The b...

Macbeth Personal Notes: Act 1 Scene 3 (Part 2/2)

Image
Macbeth Personal Notes: Act 1 Scene 3 (Part 2/2)   "Lesser than Macbeth, and greater. Not so happy, yet much happier. Thou shalt get kings, though thou be none." The witches mean that though Banquo will be lesser in rank than Macbeth, he will be morally higher. Banquo will be less successful than Macbeth, but he will be satisfied with his life and do not have to worry about someone taking his position. Banquo will be the father of the kings though he himself will not get the chance to be one. Witches vanish When Macbeth hears the witches predict about his future of becoming the Thane of Cawdor and eventually king, and Banquo's prediction of becoming the father of kings, he asks the witches how these predictions will come true and how the witches have come to know about their future. He also asks them that why had they chose them to stop on the way to the Foress and talk about their futures.  The witches chose not to answer Macbeth's questions and vanish into the air. ...

Macbeth Personal Notes: Act 1 Scene 3 (Part 1)

Image
Macbeth Personal Notes: Act 1 Scene 3 (Part 1) Setting: The scene takes place on a heath near Forres. Heath: A heath is a barren wasteland.  Forres: A city in Scotland where the castle of King Duncan is located.  Weather: The scene starts with the witches meeting with each other on a barren wasteland. The weather is one that is according to the preferences of the witches. It is lightning through the sky. The lightning symbolizes the unbalance in nature that the witches cause with their supernatural powers, and it also foreshadows the turbulence in Macbeth's heart a little bit ahead in scene that the witches' prophecies will cause. Witches' favorite pastime activity:  The scene showcases that the favorite pastime activity for the witches is to kill swine (old English word for pigs) and cause trouble for the normal human beings. The scene starts with the First Witch asking where the other witches were. The Second Witch answers that she had been killing swine as a leisure ac...

One word Essay: Adventure

Image
One word Essay: Adventure The word adventure, which suddenly cause one to feel excited, upon hearing usually describes an experience or an activity which is particularly dangerous or filled with excitement. It is one of many English words whose dictionary definition does not hold true for everyone as every individual has a particular hobby or memory which they call adventurous. For some hiking on a mountain may be adventurous, and for others taking part in dangerous activities and games might be adventurous. Some people might find it interesting to hear the adventure of others rather than going on one themselves while others would like to have an adventurous time through the perspective of someone else like in movies. Adventures makes our life interesting and joyful. It is very hard to live each day following the same schedule. Adventures helps to bring a change of pace to our initially dull and unvaried life. Whether it is going out for fishing by the lakeside or playing video games w...

If you could jump into the world of any book and spend a day with the characters, which book it would be and what character would you want to hang out with?

Image
If you could jump into the world of any book and spend a day with the characters, which book it would be and what character would you want to hang out with? Books are one of the greatest products that humanity has ever created by incorporating their intelligence and creativity. Books are not only a source of vast knowledge in our hands, but they also provide entertainment. There are various types and genres of books available on the market. Whether it is the fiction books or the non-fiction ones, it is the skills and style of the author that makes the reading interesting and often productive too. Books have always been regarded as the key that open the gates to wonders and fantasy in the minds of children as well as adults. When someone picks up a well written book, then age becomes a number in actual ways as old as well as young experience the same joy and feels the same ecstasy. There are uncountable books to choose from, but the one I like the most is “400 Days” by Chetan Bhagat. Th...

The Graph of understanding and learning

Image
The Graph of understanding and learning Learning can be fun for some students while some may also find it tiring. But it does not really matter, since we are supposed to develop the habit to learn new things so that we do not find ourselves stuck in the future. At first, I was also disinterested in studying, but it did not take me long to realize how learning new topics and subjects can actually be fun and useful too.  In this article, I will mainly talk about my experience during the tenth grade when I was preparing for the ICSE 2024 Board Exams. When I look back at my journey of study, I can make out a key observation. It was that if you are taught a new topic, you should not expect to fully understand it in one go. Well, there are a few exceptions, but most students find themselves utterly defeated when they face a new concept or topic. At these times, we should know that it is the natural reaction. We should always push ourselves to read the topic again and again till we finall...

Be the change that you wish to be. Reflect on the statement.

Image
Be the change that you wish to be. Reflect on the statement. Change is the natural law of nature. There is nothing in the universe that can exist without changing to fit itself to the surroundings which is continuously changing. A change can be as small as the changing of colors of radium when stroked with photons or it can be as big as the expansion of universe and change of climate. In nature, it is usually observed that it is not required to force a substance to bring a change to itself, but humans require a catalyst to force themselves to bring a change. This is one of the reasons that the saying "be the change that you wish to be" can be heard since thousands of years.  In the modern times, we have significantly reduced physical work from our daily routine. This has led to an increase in many diseases like diabetes and obesity. Since almost all of our work can be done with the help of computers and machines, humans barely need to do any labor. The adults are aware of it,...

Macbeth Personal Notes: Act 1 Scene 2

Image
Macbeth Personal Notes: Act 1 Scene 2 Setting: The scene is set in a camp near Forres "As seemeth by his plight" An injured sergeant is standing in front of the King Duncan. Duncan asks from his servants who the bleeding man is and concludes from his condition that he is in condition to report the latest developments of the revolt. "Who like a good and hardy soldier fought 'gainst my captivity" Malcolm, the elder son of the king, answers his father and tells him that the bleeding man is a sergeant, who fought to prevent him from being taken as a war prisoner.  "Doubtful it stood" The battlefield stood doubtful. It was difficult to say which side was winning as the soldiers from both sides were tired and as two swimmers who were exhausted holds onto each other so that neither can swim, the soldiers held each other making it impossible for either of them to win. Macdonwald => the name of the rebel. "Worthy to be a rebel" Macdonwald is worthy...

Argumentative Essay: Is the advancement of autonomous vehicles a positive development for society?

Image
Argumentative Essay: Is the advancement of autonomous vehicles a positive development for society? Human Technologies have advanced much faster in the last decade than before. We have worked towards automations and extracting better output from our machines. Many have contributed towards making autonomous machines. These machines were first used for industrial use only, but slowly they are being modified so that the general public can also enjoy their benefits. One such invention is autonomous vehicles, also known as self-driving vehicles. They do not need a human driver to operate them instead, they rely on advance artificial intelligence technologies to move without the need of a driver.  The manufacturing and usage of autonomous vehicles have increased significantly in the past ten years. They do not require a human operator, so they are very profitable to courier and other delivery companies. One of the major benefits of autonomous vehicles are that the people with disability c...

Translate