This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
for i := 1; i <= 100; i++ { | |
if i%3 == 0 && i%5 == 0 { | |
fmt.Println("CracklePop") | |
} else if i%3 == 0 { | |
fmt.Println("Crackle") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Alex Berke (aberke) | |
Problem: | |
-------- | |
https://www.hackerrank.com/contests/101hack29/challenges/xaero-and-palindromic-strings/copy-from/1300744544 | |
A string is called a palindromic string if it can be read the same going forward as well as backwards. | |
What is the probability of choosing a substring of such that the letters of the chosen substring can be | |
shuffled to make it a palindromic string? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Tic-Tac-Toe | |
----------- | |
Play from command line: | |
$ python main.py | |
""" | |
QUIT = "q" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Snap Crackle Pop | |
---------------- | |
Prints out the numbers 1 to 100 (inclusive). | |
If the number is divisible by 3, print Crackle instead of the number. | |
If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop! | |
""" | |
MIN = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%------------------------------------------------------------------- | |
%%% @doc | |
%%% Snap Crackle Pop | |
%%% Prints out the numbers 1 to 100 (inclusive). | |
%%% If the number is divisible by 3, print Crackle instead of the number. | |
%%% If it's divisible by 5, print Pop. | |
%%% If it's divisible by both 3 and 5, print CracklePop. | |
%%% | |
%%% Run (the simple way): | |
%%% - Download erlang/otp: $ brew install erlang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************** | |
---------------------------------------------------- | |
Author: Alexandra Berke (aberke) | |
Written: Summer 2014 | |
---------------------------------------------------- | |
Formats the phonenumber as (222) 333-4444 within the input element | |
Binds only the number 2223334444 to the model |