This file contains hidden or 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 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> |
This file contains hidden or 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
| 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): |