Skip to content

Instantly share code, notes, and snippets.

View SirMefju's full-sized avatar

Mateusz Cieślik SirMefju

View GitHub Profile
def collatz(number):
checked_number = number
table = []
while number != 1:
if number % 2 == 0:
number = number / 2
else:
number = 3 * number + 1
print(int(number))
table.append(int(number))
import os
from time import sleep
print("Delta calculation:")
def calc_delta():
a = float(input("Gimme 'a' "))
b = float(input("Gimme 'b' "))
c = float(input("Gimme 'c' "))
delta = b * b - 4.0 * a * c
package com.company;
import java.util.Scanner;
import static java.lang.Math.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int round = 1;
int min = 1;
int max = 20;
int number = (int) (Math.random() * (max - min + 1)) + min;
System.out.println("Chose number between 1 - 20");
Scanner in = new Scanner(System.in);
boolean score = false;
while (!score) {
String a = in.nextLine();
int chosen = Integer.parseInt(a);