Skip to content

Instantly share code, notes, and snippets.

@crissyg
crissyg / sum.py
Created July 19, 2017 14:58
Find the sum of all the multiples of 3 or 5 below n .
#!/bin/python3
import sys
t = int(input().strip())
for a0 in range(t):
n = int(input().strip())
sum=0
for i in range(1, n):
if (i % 3==0) or (i % 5==0):
@crissyg
crissyg / sum.fs
Last active July 19, 2017 14:59
F# program. Sum two numbers
/// F# program
/// Sum two numbers
/// by crissyg
open System
[<EntryPoint>]
let main argv =
let a = Console.ReadLine() |> int
let b = Console.ReadLine() |> int
@crissyg
crissyg / sumTwoNumber.hs
Last active July 19, 2017 15:00
You are given two integers, a and b on separate lines. Output an integer that denotes a + b
--Haskell program
--Description: You are given two integers, a and b on separate lines. Output an integer that denotes a + b
--by: crissyg
solveMeFirst a b = a + b
main = do
val1 <- readLn --scan val1
val2 <- readLn --scan val2
let sum = solveMeFirst val1 val2
'VBScript - launch browsers on Windows OS
'Description: This vb scripts launches IE, Chrome and Firefox to the url www.msn.com
'by crissyg
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("iexplore.exe www.msn.com", 1)
Return = WshShell.Run("chrome.exe www.msn.com", 1)
Return = WshShell.Run("firefox.exe www.msn.com", 1)
// Day 7 Hackerrank
/*Description: Given an array,A , of N integers, print 's elements in reverse order as a single line of space-separated numbers.
Input Format
*/
//by crissyg
import java.io.*;
import java.util.*;
//Day 8: Dictionaries and Maps
/*Description: Hackerrank - Given names and phone numbers, assemble a phone book that maps friends' names to their
respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each queried,
print the associated entry from your phone book on a new line in the form name=phoneNumber;
if an entry for is not found, print Not found instead.*/
//by crissyg
import java.util.*;
import java.io.*;
@crissyg
crissyg / product.html
Last active July 13, 2017 14:01
Displays product of n * 2 .
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<h1>Product!</h1>
<p id ="product"></p>
@crissyg
crissyg / HomePage.html
Last active July 19, 2017 14:28
Home Page Website Anime
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ANISPACE HOME</title>
<meta name="keywords" content="Animes, Quotes, Gallery Comments" />
<meta name="description" content="This is AniSpace." />
<link href="styles/style.css" rel="stylesheet" type="text/css" />
<link href="styles/menu.css" rel="stylesheet" type="text/css" />
<script src="javascript/jquery.min.js" type="text/javascript"></script>
@crissyg
crissyg / RockPaperScissors.html
Last active July 19, 2017 14:23
Simple Rock Paper Scissors game using a confirmation box
<html>
<head>
<SCRIPT LANGUAGE="JavaScript"> ;
// Rock , Paper, Scissors Game
// prompt user to choose
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random(); // variable = to # between 0 and 1