Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python Online

programa = "while(true){if(a+b==0){print(a);}}"

def filter(instr):
    tamanio = len(instr)
    corchetes = ""
    for x in range(0, tamanio):
        if instr[x]=="{" or instr[x]=="}":
            corchetes= corchetes + instr[x]
    return corchetes
    
print filter(programa)

def delete(instr):
    aux = filter(instr)
    tamanio = len(aux)
    borrado = ""
    primero = False
    encontro = False
    colocar = True
    borro = False
    
    for x in range(0, tamanio):
        if aux[x]=="{" and primero==False and borro==False:
            primero=True
            colocar=False
        if aux[x]=="}" and primero==True and borro==False:
            encontro=True
            colocar=False
            borro=True
        if colocar:
            borrado = borrado + aux[x]
        colocar = True
    if encontro:
        return borrado
    else:
        return aux
   
print delete(programa)
print delete("{{}{}}")
print delete("}{{")

def recursiva_del(instr):
    retorna=delete(instr)
    if instr == delete(instr):
        if instr == "":
            return "El programa revisado tiene sintaxis correcta"
        else:
            return "El programa revisado tiene sintaxis incorrecta"
    else:
        return recursiva_del(retorna)

print recursiva_del(programa)
    

Execute Python Online

# Hello World program in Python
    
print "Hello World!\n"

Beautiful Design Brief Link

print "https://docs.google.com/a/mevsd.us/presentation/d/17_3jrltnZpuJ0Mqs5WPCOUB60wwsv1pSVF97glJgOq0/edit?usp=sharing"
#press execute
#copy and paste link

Beautiful Design Brief Link

print "https://docs.google.com/a/mevsd.us/presentation/d/17_3jrltnZpuJ0Mqs5WPCOUB60wwsv1pSVF97glJgOq0/edit?usp=sharing"

print "Hello World!\n"

# Hello World program in Python
    
print "Hello World!\n"

Python

# Hello World program in Python
    
print "Hello World!\n"

IP Address Parser

from urllib.request import urlretrieve
import re

files_www = 'https://feeds.dshield.org/block.txt'
files_dlloc = 'c:\dshield.txt'
urlretrieve(files_www, files_dlloc)

f = open(files_dlloc, 'r')
raw_text = str(f.readlines())
f.close()
ip_address = r'(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})\.(?:[\d]{1,3})'
foundip = re.findall( ip_address, raw_text )

print (foundip)

sdpta

#sdpta
x1=[[1,1],[3,1],[-0.5,1],[-2.5,1]]
weight=[-2.5,1.75]
d=[1,1,-1,-1]
output=0
c=0.1
net=0
flag=True
training_cycle=0;
lambda1=1
while(flag):
    flag=False
    training_cycle=training_cycle+1
    print "training cycle:",training_cycle
    for i in range(len(x1)):
        net=0
        for j in range(len(weight)):
            net=net+weight[j]*x1[i][j]
        if net<0:
            output=-1
        elif net>0:
            output=1
        E=pow(d[i]-output,2)/2
        if E!=0:
            for k in range(len(weight)):
                weight[k]=weight[k]+(c*(d[i]-output)*x1[i][k])/2
                flag=True
        print weight
print E

fehgirlscript

from random import *
print("Random Girls Script")
girls = ['Amelia', 'Anna', 'Athena', 'Azura', 'Beruka',
         'Caeda', 'Caeda (Bridal Blessings)', 'Camilla',
         'Camilla (Spring Festival)', 'Catria']
i = 0
while len(girls) != 0:
    if i % 2 == 0:
        print("===================")
    rand = randint(0, len(girls) - 1)
    print(girls[rand])
    girls.remove(girls[rand])
    i = i + 1
print("===================")

yogi

# Hello World program in Python
    
print "Hello World!\n"

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.