Thursday, March 13, 2025

Love Towards Mathematics 🖤




 Amish Lammechhane Gurung 

Teacher of Pathibhara English School, Itahari



Mathematics Everywhere: From Nature to Mastery

Okay everyone, let's continue our journey of mathematics! Now, I know some of you might not exactly love math—yet—but trust me, by the time we’re done, you’ll realize math is your secret strength. And guess what? Math is everywhere; in everything you do. Don’t believe me? Let me show you.




                                                                                                          Algebra: Playing with letters and numbers

Let’s play with numbers for a moment. Imagine you have two apples, and your friend gives you three more. Now you’ve got five apples (and a very generous friend too). What just happened? You learned algebra! Yes, 2a + 3a = 5a. Congratulations, you just did algebra! And you didn't even realize it.

But algebra isn’t just about apples. It’s used in budgeting, calculating distances, and even planning your daily schedule. Without even thinking about it, you're solving equations every day.





Geometry: The Paper-folding Technique

Now, let’s talk geometry. Take a square piece of paper, fold it in half diagonally. Unfold it. And just like that, you’ve created two right-angled triangles. See? Geometry is all around you. Next time you fold a paper for fun or for origami, guess what? 
You’re doing geometry. Isn’t that fascinating?

But wait, there’s more! Have you noticed how architects use geometry to design buildings or how artists use it to create stunning patterns? From bridges to paintings, geometry makes the world beautiful and functional.



                                                                                                        Percentages: Sharing Made Clear

Okay, let’s switch gears to percentages. Imagine a chocolate bar divided into 100 tiny pieces. If you eat 25 pieces, you’ve eaten 25% of the chocolate. If you’re feeling generous and share 50 pieces with your friends, you’ve shared 50%.

Percentages are just a fancy way of talking about parts out of 100. Simple, right? If you eat one piece, that’s 1%. If you eat half the chocolate, that’s 50%. If you eat the entire bar (no judgment here), that’s 100%! See how straightforward percentages can be? Congratulations, you’ve mastered percentages!

Understanding percentages helps in real life too. Discounts at your favorite store? That’s percentages in action. Calculating your test scores? You guessed it—percentages again!



Nature is a Math Expert

Let’s take a moment to appreciate nature. Ever noticed how honeycombs are made up of perfect hexagons? Bees, the natural mathematicians, figured out that hexagons use the least wax while holding the most h
oney. And raindrops? They're almost perfect spheres because of surface tension and geometry. So yes, nature’s secretly doing math all the time.

Even the arrangement of leaves on a plant follows the Fibonacci sequence, a mathematical pattern seen in sunflowers, pinecones, and even galaxies. Amazing, right?



                                                                                

Math = Your Personal Problem Solver

Here’s the thing: Math is like your most reliable friend when it comes to solving problems. Whether you’re deciding how many games to play before doing your homework or figuring out how to divide snacks evenly among friends, math is always there to assist you.

Want to design an app, build a skyscraper, or even go to space? Math is your ticket to all of that. It’s the ultimate problem-solving tool. Engineers, doctors, and even athletes use math every day to improve their performance and results.






Fall in Love with Math

Here’s the deal: Math isn’t just about numbers and equations. It’s the language of the universe. Whether it’s the beat of your favorite song or the symmetry in your favorite painting, math is everywhere. The more you explore it, the more you’ll see just how intriguing it is.

Look at sports strategies, video game designs, and even baking recipes—math plays a role in all of them. The deeper you dive, the more you'll find math hiding in plain sight.



The Final Equation

Let’s wrap this up: Math isn’t boring or intimidating—it’s a treasure chest waiting to be unlocked. It helps you think critically, solve problems efficiently, and even enjoy a little humor along the way.

So, the next time you’re folding paper, sharing snacks, or even just relaxing, remember: math is always there, in the background, making everything work. Add some joy, subtract the fear, multiply your curiosity, and divide the fun with your friends. Because math isn’t just everywhere—it’s in you.

Now, go showcase those math skills. Who knows, you might even inspire someone else to say, “Hey, math is actually fascinating!”


Saturday, May 20, 2017

( 9608 ) Pre-release Material 2017 Paper 4: Solution




OOP ( Containment )


Task 1.2


Module Module1


    Class Test

        Private TestID As String
        Private Questions(10) As Question
        Private NumberOfQuestions As Integer
        Private MaxMarks As Integer
        Private Level As Char
        Private DateSet As Date

        Private markCount As Integer = 0
        Private flag As Boolean = False

        Public Sub DesignTest()
            markCount = 0
            Dim qID As String
            Dim qText As String
            Dim Ans As String
            Dim Mar As Integer = 0
            Dim Top As String

            Console.Write(" Enter test ID: ")
            TestID = Console.ReadLine()



            Console.Write(" Enter number of questions: ")

            Do
                NumberOfQuestions = Console.ReadLine()

                If NumberOfQuestions > 10 Then
                    Console.WriteLine()
                    Console.Write(" Invalid. The maximum number of questions is 10.")
                    Console.Write(" Enter number of questions again: ")
                Else
                    flag = True
                End If

            Loop Until flag = True

            flag = False


            Console.Write(" Enter maximum number of marks: ")
            MaxMarks = Console.ReadLine()

            Console.Write(" Enter the test Level ( A , S, G ): ")
            Do
                Level = Console.ReadLine()
                Level = UCase(Level)
                If Level = "A" Or Level = "S" Or Level = "G" Then
                    flag = True

                Else
                    Console.WriteLine()
                    Console.Write("Invalid. Valid test levels are ( A, S, G): ")
                End If
            Loop Until flag = True
            flag = False


            Console.Write(" Enter the test date: ")
            DateSet = Console.ReadLine()
            Console.WriteLine()

            For counter As Integer = 1 To NumberOfQuestions
                Console.Write(" Enter question {0} QuestionID: ", counter)
                qID = Console.ReadLine()

                Console.Write(" Enter Question Topic: ")
                Top = Console.ReadLine()

                Console.Write(" Enter question {0} Question text: ", counter)
                qText = Console.ReadLine()

                Console.Write(" Enter question {0} question answer: ", counter)
                Ans = Console.ReadLine()

                Console.Write(" Enter question {0} Question mark: ", counter)


                Do
                    Mar = Console.ReadLine()
                    markCount = Mar + markCount
                    If markCount > MaxMarks Then
                        markCount = markCount - Mar
                        Console.WriteLine()
                        Console.Write(" Invalid. You cannot give mark greater than maximum number of marks. Remaining number of marks is {0}. Enter again: ", (MaxMarks - markCount))

                    Else
                        flag = True
                    End If
                Loop Until flag = True

                flag = False

                Questions(counter) = New Question
                Questions(counter).SetQuestion(qID, qText, Ans, Mar, Top)
                Console.WriteLine()
            Next


        End Sub



        Public Sub PrintTest()
            Console.WriteLine("Test ID: " & TestID)
            Console.WriteLine("Test Date: " & DateSet)
            Console.WriteLine("Test Leve: " & Level)
            Console.WriteLine("Number of questions in a test: " & NumberOfQuestions)
            Console.WriteLine()


            For counter As Integer = 1 To NumberOfQuestions
                Console.WriteLine(" Question {0} Topic: {1} ", counter, Questions(counter).GetTopic)
                Console.WriteLine(" Question {0} ID and Text: {1} ", counter, Questions(counter).GetQuestion)
                Console.WriteLine(" Question {0} mark: {1} ", counter, Questions(counter).GetMarks)
                Console.WriteLine()


            Next

        End Sub


        Public Sub PrintAnswers()
            Console.WriteLine("Test ID: " & TestID)
            Console.WriteLine("Test Date: " & DateSet)
            Console.WriteLine("Test Leve: " & Level)
            Console.WriteLine("Number of questions in a test: " & NumberOfQuestions)
            Console.WriteLine()

            For counter As Integer = 1 To NumberOfQuestions
                Console.WriteLine(" Question {0} Topic: {1}", counter, Questions(counter).GetTopic)
                Console.WriteLine(" Answer of Question {0}: {1}", counter, Questions(counter).GetAnswer)
                Console.WriteLine(" Question {0} mark: {1}", counter, Questions(counter).GetMarks)
                Console.WriteLine()
            Next

        End Sub

    End Class



    Class Question

        Private QuestionID As String
        Private QuestionText As String
        Private Answer As String
        Private Marks As Integer
        Private Topic As String

        Public Sub SetQuestion(ByVal qID As String, ByVal qText As String, ByVal Ans As String, ByVal Mar As Integer, ByVal Top As String)
            QuestionID = qID
            QuestionText = qText
            Answer = Ans
            Marks = Mar
            Topic = Top
        End Sub

        Public Function GetQuestion() As String
            Return (QuestionID & " " & QuestionText)
        End Function

        Public Function GetMarks() As Integer
            Return (Marks)
        End Function

        Public Function GetTopic() As String
            Return (Topic)
        End Function

        Public Function GetAnswer() As String
            Return (Answer)
        End Function

    End Class


    Sub Main()
        Dim access As Test = New Test()
        Dim choice As Integer
        choice = 0


        Do

            Console.WriteLine("1. Design Test")
            Console.WriteLine("2. Print Question")
            Console.WriteLine("3. Print Answer")
            Console.WriteLine("4. Exit")

            choice = Console.ReadLine()
            Console.Clear()


            Select Case choice
                Case 1
                    access.DesignTest()
                    Console.ReadLine()
                    Console.Clear()
                Case 2
                    access.PrintTest()
                    Console.ReadLine()
                    Console.Clear()
                Case 3
                    access.PrintAnswers()
                    Console.ReadLine()
                    Console.Clear()
            End Select

        Loop Until choice = 4

    End Sub
End Module



Friday, April 7, 2017

Random Number: Program code ( visual basic )

Computer Science(9608) notes and Resources






Program that randomly generates number from 1 to 100 both inclusive. 




Module Module1

    Sub Main()
        Randomize()
        Dim Temp As Integer
        For i = 1 To 4
            Temp = Int(Rnd() * 100) + 1
            Console.WriteLine(Temp)
        Next
        Console.ReadLine()
    End Sub

End Module





Module Module1

    Sub Main()

        Dim temp As New Random
        Dim num As Integer
        For counter = 1 To 50
            num = temp.Next(1, 101)
            Console.WriteLine(num)
        Next
        Console.ReadLine()
    End Sub

End Module





Dictionary: Program code ( visual basic )



Computer Science(9608) notes and Resources






Implementing a dictionary using Dictionary class in Visual Basic





Module Module1

    Dim dictionary As New Dictionary(Of String, Integer)


    Sub InsertInDictionary(ByVal key As String, ByVal value As Integer)
        If dictionary.ContainsKey(key) Then
            Console.WriteLine(" Key alreadly exist! ")
        Else
            dictionary.Add(key, value)
        End If

    End Sub



    Sub findInDictionary(ByVal key As String)
        If dictionary(key) Then
            Console.WriteLine(" Found and its value is: " & dictionary(key))
        Else
            Console.WriteLine(" Not Found ")
        End If
    End Sub



    Sub removeFromDictionary(ByVal key As String)
        dictionary.Remove(key)
    End Sub



    Sub printValueInDictionary(ByVal key As String)
        Console.WriteLine(dictionary(key))
    End Sub



    Sub printNoOfEntriesInDictionary()
        Console.WriteLine(dictionary.Count)
    End Sub



    Sub printDictionary()
        Dim pair As KeyValuePair(Of String, Integer)

        For Each pair In dictionary

            Console.WriteLine("{0}, {1}", pair.Key, pair.Value)
        Next
    End Sub



    Sub Main()
        Console.WriteLine(" Inserting 4 items in dictionary")
        InsertInDictionary("John", 10)
        InsertInDictionary("maria", 90)
        InsertInDictionary("sofia", 50)
        InsertInDictionary("Mia Kalifa", 69)
        Console.WriteLine()
        Console.Write(" Value of key sofia: ")
        printValueInDictionary("sofia")
        Console.WriteLine()
        Console.Write(" Number of items in dictionary: ")
        printNoOfEntriesInDictionary()
        Console.WriteLine()
        Console.WriteLine(" Remove one item from dictionary")
        removeFromDictionary("Mia Kalifa")
        Console.WriteLine()
        Console.WriteLine(" Print whole dictionary")
        printDictionary()
        Console.WriteLine()
        Console.WriteLine(" find an item:")
        findInDictionary("sofia")
        Console.ReadLine()

    End Sub



End Module




                                                                                                         - CIE A-LEVEL COMPUTER SCIENCE (  9608 )