From e75dc1d882b98b8565506f3b427612e9e07fc4bf Mon Sep 17 00:00:00 2001 From: Ovando Date: Tue, 15 Nov 2016 10:28:41 -0500 Subject: [PATCH 1/3] testing from work --- insert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insert.py b/insert.py index 64fce35..3514227 100644 --- a/insert.py +++ b/insert.py @@ -5,7 +5,7 @@ def swap(list1, first, second): list1[0] = second list1[1] = temp - +# hi def srt(lst): From eaf4afb083ea4c6d76ccbb21eb848c2527d6c457 Mon Sep 17 00:00:00 2001 From: Ovando Date: Tue, 15 Nov 2016 12:02:49 -0500 Subject: [PATCH 2/3] ho --- insert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/insert.py b/insert.py index 3514227..67e78b7 100644 --- a/insert.py +++ b/insert.py @@ -32,4 +32,4 @@ def srt(lst): # print l srt(l) # swap(l, 15, 14) -print l \ No newline at end of file +print l #hii \ No newline at end of file From 73f6d8efff7753d6bdd7cd634ccf4b98490f57fb Mon Sep 17 00:00:00 2001 From: Ovando Date: Tue, 15 Nov 2016 14:10:46 -0500 Subject: [PATCH 3/3] 02:09 --- binaryS.py | 35 +++++++++++++++++++++++++++++++++++ insert.py | 2 +- rec.py | 16 ++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 binaryS.py create mode 100644 rec.py diff --git a/binaryS.py b/binaryS.py new file mode 100644 index 0000000..1703334 --- /dev/null +++ b/binaryS.py @@ -0,0 +1,35 @@ +def binaryS(f): + l = [1,2,4,5,6,7,8,9,10,11,12,13] + midpos = len(l)/2 + + found = False + first = l[0] + last = l[-1] + print last + print midpos + + if len(l)==0: + print False + + if l[midpos]==f: + print True + + while first<=last and not found: + if f>l[midpos]: + first = l[midpos]+1 + print first + found = True + print found + + + + + + +binaryS(1) +# from turtle import Turtle +# t=Turtle() +# for x in xrange(440): +# t.forward(5) +# t.left(10) +# # t.right(20) \ No newline at end of file diff --git a/insert.py b/insert.py index 67e78b7..d035d73 100644 --- a/insert.py +++ b/insert.py @@ -32,4 +32,4 @@ def srt(lst): # print l srt(l) # swap(l, 15, 14) -print l #hii \ No newline at end of file +print l #hiioco \ No newline at end of file diff --git a/rec.py b/rec.py new file mode 100644 index 0000000..6f70070 --- /dev/null +++ b/rec.py @@ -0,0 +1,16 @@ +from random import randint + +def parse(): + s=[] + f = {(randint(0,9),randint(0,9)), + (randint(0,9),randint(0,9)), + (randint(0,9),randint(0,9)), + (randint(0,9),randint(0,9)), + } + for i, o in f: + s.append(i) + s.append(o) + return s + + +print parse() \ No newline at end of file