xxxxxxxxxx
import requests
from bs4 import BeautifulSoup
page = requests.get('https://vet3.net/result?cate1=Speedway')
soup = BeautifulSoup (page.content, 'html.parser')
#soup.find('span', {'style':'float:right' }).text#pegando so a ddd
soup.find('td', {'style':'font-size:18px;text-align:center;background:#333333' }).text#pegando hora e minutos
#soup.find('td', {'style':'font-size:18px;text-align:left;padding-right:5px;' }).text#pegando NOME e ODD
#soup.find('td', {'style':'font-size:18px;text-align:center;color:#FFE418' }).text#pegando o GANHANDOR
#soup.find('td', {'style':'font-size:18px;text-align:center' }).text#pegando o DIA MES DATA E HORA
xxxxxxxxxx
print(30*"-")
print("asp191.py version 1.000630")
print("Written by ")
print(30*"-")
print(" error.")
print(30*"-")
print("You should use this app only one time.")
print("Following file will be changed:")
xxxxxxxxxx
def fetchItemsToDisplay(items, sortParameter, sortOrder, itemPerPage, pageNumber):
items.sort(key=lambda x: int(x[sortParameter]) if sortParameter > 0 else x[sortParameter], reverse=sortOrder==1)
return [n for n,_,_ in items[pageNumber*itemPerPage: (1+pageNumber)*itemPerPage]]
print(fetchItemsToDisplay([["p1", "1", "2"], ["p2", "2", "1"]], 0, 0, 1,0))
xxxxxxxxxx
def MissingDigit(strParam):
#
# Split the expression to
# extract operands, operator
# and resultant
exp = list(strParam.split())
first_operand = exp[0]
operator = exp[1]
second_operand = exp[2]
resultant = exp[-1]
# If x is present in resultant
if 'x' in resultant:
x = resultant
first_operand = int(first_operand)
second_operand = int(second_operand)
if operator == '+':
res = first_operand + second_operand
elif operator == '-':
res = first_operand - second_operand
elif operator == '*':
res = first_operand * second_operand
else:
res = first_operand // second_operand
# If x in present in operands
else:
resultant = int(resultant)
# If x in the first operand
if 'x' in first_operand:
x = first_operand
second_operand = int(second_operand)
if operator == '+':
res = resultant - second_operand
elif operator == '-':
res = resultant + second_operand
elif operator == '*':
res = resultant // second_operand
else:
res = resultant * second_operand
# If x is in the second operand
else:
x = second_operand
first_operand = int(first_operand)
if operator == '+':
res = resultant-first_operand
elif operator == '-':
res = first_operand - resultant
elif operator == '*':
res = resultant // first_operand
else:
res = first_operand // resultant
res = str(res)
k = 0
for i in x:
if i == 'x':
result = res[k]
break
else:
k = k + 1
return result
# keep this function call here
print MissingDigit(raw_input())
xxxxxxxxxx
def MissingDigit(strParam):
#
# Split the expression to
# extract operands, operator
# and resultant
exp = list(strParam.split())
first_operand = exp[0]
operator = exp[1]
second_operand = exp[2]
resultant = exp[-1]
# If x is present in resultant
if 'x' in resultant:
x = resultant
first_operand = int(first_operand)
second_operand = int(second_operand)
if operator == '+':
res = first_operand + second_operand
elif operator == '-':
res = first_operand - second_operand
elif operator == '*':
res = first_operand * second_operand
else:
res = first_operand // second_operand
# If x in present in operands
else:
resultant = int(resultant)
# If x in the first operand
if 'x' in first_operand:
x = first_operand
second_operand = int(second_operand)
if operator == '+':
res = resultant - second_operand
elif operator == '-':
res = resultant + second_operand
elif operator == '*':
res = resultant // second_operand
else:
res = resultant * second_operand
# If x is in the second operand
else:
x = second_operand
first_operand = int(first_operand)
if operator == '+':
res = resultant-first_operand
elif operator == '-':
res = first_operand - resultant
elif operator == '*':
res = resultant // first_operand
else:
res = first_operand // resultant
res = str(res)
k = 0
for i in x:
if i == 'x':
result = res[k]
break
else:
k = k + 1
return result
# keep this function call here
print MissingDigit(raw_input())
xxxxxxxxxx
def MissingDigit(strParam):
#
# Split the expression to
# extract operands, operator
# and resultant
exp = list(strParam.split())
first_operand = exp[0]
operator = exp[1]
second_operand = exp[2]
resultant = exp[-1]
# If x is present in resultant
if 'x' in resultant:
x = resultant
first_operand = int(first_operand)
second_operand = int(second_operand)
if operator == '+':
res = first_operand + second_operand
elif operator == '-':
res = first_operand - second_operand
elif operator == '*':
res = first_operand * second_operand
else:
res = first_operand // second_operand
# If x in present in operands
else:
resultant = int(resultant)
# If x in the first operand
if 'x' in first_operand:
x = first_operand
second_operand = int(second_operand)
if operator == '+':
res = resultant - second_operand
elif operator == '-':
res = resultant + second_operand
elif operator == '*':
res = resultant // second_operand
else:
res = resultant * second_operand
# If x is in the second operand
else:
x = second_operand
first_operand = int(first_operand)
if operator == '+':
res = resultant-first_operand
elif operator == '-':
res = first_operand - resultant
elif operator == '*':
res = resultant // first_operand
else:
res = first_operand // resultant
res = str(res)
k = 0
for i in x:
if i == 'x':
result = res[k]
break
else:
k = k + 1
return result
# keep this function call here
print MissingDigit(raw_input())
xxxxxxxxxx
def MissingDigit(strParam):
#
# Split the expression to
# extract operands, operator
# and resultant
exp = list(strParam.split())
first_operand = exp[0]
operator = exp[1]
second_operand = exp[2]
resultant = exp[-1]
# If x is present in resultant
if 'x' in resultant:
x = resultant
first_operand = int(first_operand)
second_operand = int(second_operand)
if operator == '+':
res = first_operand + second_operand
elif operator == '-':
res = first_operand - second_operand
elif operator == '*':
res = first_operand * second_operand
else:
res = first_operand // second_operand
# If x in present in operands
else:
resultant = int(resultant)
# If x in the first operand
if 'x' in first_operand:
x = first_operand
second_operand = int(second_operand)
if operator == '+':
res = resultant - second_operand
elif operator == '-':
res = resultant + second_operand
elif operator == '*':
res = resultant // second_operand
else:
res = resultant * second_operand
# If x is in the second operand
else:
x = second_operand
first_operand = int(first_operand)
if operator == '+':
res = resultant-first_operand
elif operator == '-':
res = first_operand - resultant
elif operator == '*':
res = resultant // first_operand
else:
res = first_operand // resultant
res = str(res)
k = 0
for i in x:
if i == 'x':
result = res[k]
break
else:
k = k + 1
return result
# keep this function call here
print MissingDigit(raw_input())
xxxxxxxxxx
def personal_details():
name, age = "Simon", 19
address = "Bangalore, Karnataka, India"
print("Name: {}\nAge: {}\nAddress: {}".format(name, age, address))
personal_details()
xxxxxxxxxx
import regex
s = 'bandau'
a = ['bamdau', 'Kandau', 'Ramayan', 'bandss', 'bazkqo', 'ban','baṃdau']
r = regex.compile('(?:'+regex.escape(s)+'){e<=1}')
for x in a:
if(r.fullmatch(x)):
print(x)
xxxxxxxxxx
n=int(input("qu'elle est votre valeur "))
for i in range(n):
print("hello world")