if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open ("alice. txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close()import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create. Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return xdraw the picture t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open ("alice. txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close()import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create. Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return xdraw the picture t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open ("alice. txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close()import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create. Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return xdraw the picture t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open ("alice. txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close()import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create. Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return xdraw the picture t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close() import turtle def createLSystem(iter, axiom): startstring = axiom endstring = "" for i in range(iter): endstring = processstring(startstring) startstring = endstring return endstring def processstring(oldstr): newstr = "" for ch in oldstr: newstr = newstr + applyrules(ch) return newstr def applyrules(ch): newstr = "" if ch == 'F': newstr = 'F[-F]F[+F]F' elif ch == 'X': newstr = '[-FFF][+FFF]FXB' else: newstr = ch return newstr def drawLsystem(t, instructions, angle, distance): savedInfoList = [] for cmd in instructions: if cmd == 'F': t.forward(distance) elif cmd == 'B': t.backward(distance) elif cmd == '+': t.left(angle) elif cmd == '-': t.right(angle) elif cmd == '[': savedInfoList.append([t.heading(), t.xcor(), t.ycor()]) elif cmd == ']': newInfo = savedInfoList.pop() t.setheading(newInfo[0]) t.setposition(newInfo[1], newInfo[2]) def main(): inst = createLSystem(5, "FFFFXX") # create the string print(inst) t = turtle.Turtle() # create the turtle wn = turtle.Screen() wn.bgcolor('ivory') t.speed(100) t.color('green') t.pensize(1) t.right(90) t.up() t.penup() t.forward(250) t.pendown() t.left(180) drawLsystem(t, inst, 45, 2) # draw the picture # angle 90, segment length 5 wn.exitonclick() main() def findLen(cmd): x = len(cmd) return x def createInstructions(): fileref = open("D:\\sometext.txt", "r") linelist = fileref.readlines() print(linelist) listcor = [] for i in linelist: if i == 'DOWN\n': cmd = "down" elif i == 'UP\n': cmd = "up" elif "\n" in i: x = findLen(i)-1 cmdstr = i[0:x] cmd = cmdstr.split() else: cmd = i listcor.append(cmd) fileref.close() print(listcor) return listcor def drawMystery(turtle, inst): t.begin_fill() for i in inst: if i == 'down': t.down() elif i == 'up': t.up() elif i == '-116 -201': t.goto(-116, -201) else: xcor = int(i[0]) ycor = int(i[1]) t.goto(xcor, ycor) t.end_fill() import turtle t = turtle.Turtle() wn = turtle.Screen() wn.bgcolor('ivory') wn.screensize(900,900) t.color('green') t.fillcolor("hotpink") t.pensize(2) inst = createInstructions() drawMystery(t, inst) input() wn.exitonclick() ''' import turtle t = turtle.Turtle() wn = turtle.Screen() wn.setworldcoordinates(-300, -300, 300, 300) f = open("mystery.txt", "r") for aline in f: items = aline.split() if items[0] == "UP": t.up() else: if items[0] == "DOWN": t.down() else: # must be coords t.goto(int(items[0]), int(items[1])) f.close() wn.exitonclick() ''' counter = 0 total = 0 number = 0 while number >= 0: number = int(input("Enter the number: ")) if number >= 0: counter += 1 total += number average = total / counter print(average) input() a = 0 b = int(input("Enter the number: ")) a = a+1 c = int(input("Enter the next number: ")) a = a+1 d = int(input("Enter the next number: ")) a = a+1 x = b+c+d total = x / a print(total) input() a = 0 x = 0 b = 0 while def countAll(text): dictionary = {} for word in text: if word not in dictionary: count = 0 elif word in dictionary: count = dictionary[word] count = count + 1 dictionary[word] = count return dictionary alice = open("D:\\alice.txt", "r") line = alice.readline() values = [] while line: smalllist = line.split() values.append(smalllist) line = alice.readline() all = [] for i in values: all += i dictionary = countAll(all) alicewords = open("D:\\alicewords.txt", "w") for k, v in dictionary.items(): alicewords.write(k + '\t' + str(v) + '\n') alice.close() alicewords.close()

Projects | Download | Contact

Ribera Digital Studio: Home


500x500

Internet sites: http://

We create WEB-sites from the first step to the last one. It means that you only have to provide your vision of site structure and to approve one of our design suggestions. User authentication, translation into foreign language, various interaction forms, blogs, polls, online platforms, administration zone, different access levels and many other features that we build will altogether make your web-project simply perfect.

In our web-design work we use the following languages and technologies: HTML, CSS, Java-Script, JQuery, Django, Wordpress, Drupal and other CMS, PostgreSQL, MySQL, Bootstrap framework etc. Here are some examples of our job well done: Jewels By Love: fine timepieces in St.Martin / St.Maarten, "Dent Studio" dental clinic, "Sicilia Nostra" travel agency, "White Sound" sound production company, "Formositas" social network for women.


500x500

Hardware design: Plug & Play

Our services: Schematics design development (analog / digital / mixed), PCB design, Firmware development, Low and mid-level driver and software development (Windows / Linux / MacOS), etc.

Fields of activity: LED controller systems, Data acquisition and analysis, Timecode-controlled applications, USB custom devices, Audio signal processing, BLDC and PMSM controllers, Force-feedback solutions, Analog matrix switches, Low-power devices, Step-up and step-down voltage converters, Automotive solutions (infortainment, data logging), etc.

Technologies we use:Microcontrollers (Atmel AVR, STM32 L & F), FPGA (Altera), Precision ADCs and DSPs (Analog Devices), GPS, RFID, Wireless networks, Ethernet, Industrial networks (CAN, RS422/485), etc.


500x500

Software design: *.exe

We design all kinds of useful software based on C#, C, C++, Embedded C, PHP, Javascript, Python and other programming languages. You can download the demo versions of our software for free.





Ribera Digital Studio: info@riberastudio.com +393318404805 Italy, Ribera (AG)