Thursday, January 7, 2016

Code + Plot + Function

How do you say "Happy New Year!" in 7 programming languages?

Here they are in C/C++, C#, Java, JavaScript, Python, and VB.NET.
C:
#include < stdio.h>
int main(void) {
    printf("Happy New Year!\n");
    return 0;
}

C#:
namespace ConsoleApplication {
    class Happy {
        static void Main(string[] args) {
            System.Console.WriteLine("Happy New Year!");
        }
    }
}

C++:
#include < iostream>
using namespace std;
int main() {
    cout << "Happy New Year!";
    return 0;
}

JAVA:
public class Happy {
    public static void main(String[] args) {
        System.out.println("Happy New Year!");
    }
}

JAVASCRIPT:
< html>
< head>
< title>Happy< /title>
< /head>
< body>
< script>
document.write("Happy New Year!");
< /script>
< /body>
< /html>

PYTHON:
print("Happy New Year!")

VISUAL BASIC:
Public Class Happy
    Private Sub Happy_Load(sender As Object, e As EventArgs)
            Handles MyBase.Load
        Dim lblHappy As New Label
        lblHappy.Text = "Happy New Year!"
        Me.Controls.Add(lblHappy)
    End Sub
End Class

What is a plot in Literature?

A plot is the plot of a story. It is a brief description of what the story is about. Some writers consider the plot as the short summary of the story. And some writers even think of plot as abstract of the story. Here are some movie plots shown on TV on December 2015 and January 2016.
THE GIANT CLAW : 1957 : Science Fiction : Giant bird menaces trains and teenagers only to be killed by a chemist who concocted gaseous solution dispersed from an U.S. Air Force bomber plane.
IT'S A MAD, MAD, MAD WORLD : 1963 : Comedy : Motorists find hidden money confessed by dying crook and is joined by others including a retiring old police captain. Money ends scattered in street.
WHO'S MINDING THE MINT? : 1967 : Comedy : U.S. Treasury Department clerk replaces $50,000 new bills he accidentally took and shredded in garbage disposal by hiring others. $1,000,000 new bills ends in sea bottom.
THE RETURN OF A MAN CALLED HORSE : 1976 : War : Englishman returns to his American Indian village only to find it obliterated by Frenchmen and their Indian allies. All Frenchmen and their allies end up dead.
SANTA CLAUS THE MOVIE : 1985 : Adventure : Toymaker gives free toys to children and ends up living in the North Pole as Santa Claus.
NUTCRACKER THE MOTION PICTURE : 1986 : Musical : Girl dreams a nutcracker soldier protects her from giant monsters. Soldier transforms into a prince and they end up dancing in his castle.
HOUSE ARREST : 1996 : Comedy : Boy locks parents in basement and is joined by other kids locking their parents in boy's basement. Boy's parents end up not divorcing and honeymooning with children in Hawaii.
ANTITRUST : 2001 : Thriller : Computer programmer learns his new employer steals from and kills non-employee brilliant programmers. He outwits and exposes conspiracy using IP addresses wired to TV broadcasts.
THE SANTA CLAUSE 3 THE ESCAPE CLAUSE : 2006 : Comedy : Santa Claus resigns only to find his North Pole home have become commercialized. Ex-Santa outwits legal clause and regains North Pole home.
DAD IS A SCROOGE : 2014 : Comedy : Talking barn animals teach and transform banker father to be charitable to couple who shelters animals on Christmas Day.
Suggested website:
http://www.dailywritingtips.com/forum/showthread.php?75-In-a-story-abstract...


What is a function in Mathematics?

A function is a relation where every input, say x value, results in only one output, say y value. A function is written as f(x), thanks to Euler.
If a line or curve with the equation y is a function, then we can say y = f(x). If y is not a function, then we cannot use f(x).
For example, the equation y = 1 is a relation that is a function because for every x value, the equation y only has 1 output y value. The equation y^2 = x is a relation that is not a function because one or more x value results into two values of y.
Suggested website:
http://www-history.mcs.st-and.ac.uk/Biographies/Euler.html

Happy Three Kings Day!

John Sindayen

No comments:

Post a Comment