Skip to content

Instantly share code, notes, and snippets.

@th3-r0n1n
th3-r0n1n / Ansi.java
Created October 4, 2018 17:36 — forked from dainkaplan/Ansi.java
Simple ANSI colors class for terminal code for JVM written in Scala and Java (two implementations)
package org.tempura.console.util;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Usage:
* <li>String msg = Ansi.Red.and(Ansi.BgYellow).format("Hello %s", name)</li>
* <li>String msg = Ansi.Blink.colorize("BOOM!")</li>
@th3-r0n1n
th3-r0n1n / char_input.py
Created December 19, 2016 03:23
exercise1
print("welcome to the 'When will I turn 100' app...")
prompt = '---->'
print()
print("How old are you?")
age = input(prompt)
years_until = 100 - int(age)
print("How many times do you want to hear what I have to say?")
repeat = int(input(prompt))
print("you are {} years old".format(age))
for i in range(repeat):