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
print("##########################################################") | |
print("\n Welcome to my file text encrypter/decrypter!") | |
print("Made using python ;)") | |
print("Usage: type encrypt to encrypt a file with providing a seed") | |
print("Usage: type decrypt to decrypt a file\'s contents if you have the correct seed") | |
print("##########################################################\n") | |
chars = {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7: 'g', 8: 'h', 9: 'i', 10: 'j', 11: 'k', 12: 'l', 13: 'm', | |
14: 'n', 15: 'o', 16: 'p', 17: 'q', 18: 'r', 19: 's', 20: 't', 21: 'u', 22: 'v', 23: 'w', 24: 'x', 25: 'y', | |
26: 'z',27: '',28: " ", 29: 0, 30: 1, 31: 2,32: 3,33: 4,34:5,35:6,36:7,37:8,38:9,39:'\n'} | |
charz = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, |
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 random | |
lst1 = [] | |
lst2 = [] | |
dups = [] | |
def func(lest): | |
while len(lest) < 32: | |
lest.append(random.randint(0,20)) | |
func(lst1) | |
func(lst2) | |
for x in lst1: |
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
num = int(input('input a number: ')) | |
lst = range(2, 1000) | |
la = [] | |
for x in lst: | |
if x < num and x != num and x != 0 and num % x == 0: | |
la.append(x) | |
if la == []: | |
print('number ' + str(num) + ' is a prime number') |
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
lst = range(0,100) | |
newlst = [] | |
def func(lest): | |
global newlst | |
newlst.append(lest[-1]) | |
newlst.append(lest[0]) | |
func(lst) | |
print(newlst) |
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
num=int(input('Enter a number:')) | |
length=int(input('To what length u want it to be?:')) | |
nuz=0 | |
list=[] | |
if len(str(num))>0: | |
list.append (num) | |
r=num+nuz | |
list.append (r) | |
while len(list)!=length: | |
dd=list[nuz]+list[nuz+1] |
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
listwithdups = [1,2,2,3,456,4,654,984,3,21,65,132,1,321,32,165,4,654,32,1,321,321,32,16,54,549,84,3,21,6,5,5,5,55,6,9,9,8,7,4,9,8,4,65,456] | |
def removedups(): | |
return set(listwithdups) | |
print(removedups()) |
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
list = input('enter a string that you want to be reversed: ').split(' ') | |
list.reverse() | |
print(' '.join(list)) | |
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 random | |
decid = input('how string do you want your password to be?(weak/medium/strong): ') | |
leng = int(input('how long do you want your password to be?: ')) | |
weak = 'a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z'.split(':') | |
medium = '0:1:2:3:4:5:6:7:8:9'.split(':') | |
strong = '!:@:#:$:%:^:&:*:_:-:=:.'.split(':') | |
password = '' | |
if decid.lower() == 'weak': | |
while len(password) < leng: | |
password += weak[random.randint(0,25)] |
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
decid = input('would you like to analyze a string or a file?') | |
def printit(cheer): | |
if cheer is not None or cheer != ' ': | |
if textls.count(cheer) != 0: | |
print(cheer + ":" + str(textls.count(cheer))) | |
elif cheer is None: | |
print("space:" + str(textls.count(cheer))) | |
elif cheer == '\n': |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Threading; | |
using System.Media; |
OlderNewer