What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-27 08:55:24
print colored text python on terminal
import colorama from colorama import Fore, Back, Style colorama.init(autoreset=True) print('\033[31m' + 'some red text') print('\033[39m') # and reset to default color print() print(f"{Fore.RED}C{Fore.GREEN}O{Fore.YELLOW}L{Fore.BLUE}O{Fore.MAGENTA}... Add solution -
Java 2022-03-26 13:40:11
generate all prime number less than n java
/** Author: Jeffrey Huang As far as I know this is almost the fastest method in java for generating prime numbers less than n. A way to make it faster would be to implement Math.sqrt(i) instead of i/2. I don't know if you could implement sieve of eratost... Add solution -
Java 2022-03-17 15:10:39
usaco why did the cow cross the road iii silver java
//sample input 3 3 3 2 2 2 3 3 3 3 2 3 3 2 3 3 3 2 2 2 3 //CODE (2021/1/18) YY/MM/DD import java.util.*; import java.io.*; public class Main { static field[][] farm; public static void main(String[] args) throws Exception { Scanner sc = new S... Add solution -
Java 2022-03-17 02:05:01
java accept 2 integers from the user, and using a method add these numbers and print the result
static void M1(int num1, int num2) { int sum = num1 + num2; System.out.println("sum of " + num1 + " and " + num2+ " = " + sum); } public static void main(String[] args) { // using Methods... Add solution -
Other 2022-03-16 23:10:27
show equation using geom_smooth
library(ggpmisc) df <- data.frame(x = c(1:100)) df$y <- 20 * c(0, 1) + 3 * df$x + rnorm(100, sd = 40) df$group <- factor(rep(c("A", "B"), 50)) my.formula <- y ~ x p <- ggplot(data = df, aes(x = x, y = y, colour = group))... Add solution -
Java 2022-03-16 10:40:07
how to make a calculator in java
// this was all coded by me, to use it get Eclipse, or IntelliJ and make a new // Java Project package javaCode; import java.util.Scanner; public class testCode { public static void main(String[] args) { Scanner scan = new Scanner(System.in); ... Add solution
Best helpers
Ranking is empty