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
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); |
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 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); |
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
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 |
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
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)) |