<?php echo '<p>Hello World</p>'; ?>

  • На форуме авторизация через STEAM, что позволяет авторизироваться за несколько секунд. Только не говорите, что вы в нем не зарегистрированы :)
  • Сообщение на форуме - гарантированный способ доставки ваших слов владельцу данного проекта. Просто зарегистрируйтесь здесь и создайте где-нибудь тему

YellowCat

Обычный гражданин
Гражданин
30 Июн 2015
51
37
55
Awards
8
В данной теме создаем заявки на получение этой медали
  • Образец для заполнения заявок здесь: (клац)
  • Дополнительная важная информация тут: (клац)
  • За оффтоп в этой теме вы можете получить предупреждение
  • Не стоит писать никому в ЛС и просить быстрее проверить заявку
    Чревато, в лучшем случае, игнором или отказом
 

FinnTheHuman

Кто-то
Иммигрант
  1. FinnTheHuman
  2. Язык - PascalABC.
    2258-2863b51ffa88a9a7d8491fdd38800746.jpg
  3. Примечания нету
 

Вложения

  • 123.png
    123.png
    143,6 КБ · Просмотры: 683

Maximka:3

Дружественный человек
Гражданин
27 Дек 2015
198
69
69
Awards
7
24
Belarus
SID
STEAM_0:0:57506573
1. Maximka 486
2.
#include <conio.h>
#include <iostream>
#include <windows.h>
using namespace std;

int main()
{
setlocale(LC_ALL, "Russian");
int medalka;
do
{
cout << "Give medal(maximka 486)? (y/n): " <<endl;
medalka = _getch();
} while(medalka != 'Y' && medalka != 'y');
Sleep(1000);
cout << "Ах, да. Спасибо.";
Sleep(1000);
}
DROP DATABASE forum
pp.vk.me_c606230_v606230377_5035_jZX3JhNFNJo.jpg

3. medalka(Maximka:3);
P.S. Я был обязан вставить его. Спасибо.
 

Лысый

Обычный гражданин
Иммигрант
5 Янв 2016
288
35
54
Awards
5
22
Ukraine
SID
STEAM_0:1:54088997
1. Лысый
2.
realpython.com_learn_python_first_steps_images_pythonlogo.jpg
Код:
import math
 
def console(value):
	out = float(raw_input(value))
	return out
 
choose = raw_input("Если хочешь x^y\sin\cos\tg\ctg\sqrt\kakaxa \n")
 
if (choose == "x^y"):
	print("x - Число под степенем. y - Степень")
	x = console("Введи x ")
	y = console("Введи y ")
	answer = math.pow(x,y)
	print ("Ваш ответ: {0}" .format(answer))
elif (choose == "sqrt"):
	print("x - Число под коренем")
	#x = raw_input("Введи x ")
	x = console("Введи x ")
	answer = math.sqrt(x)
	print ("Ваш ответ: {0}" .format(answer))
elif (choose == "sin"):
	x = console("x - Градусы ")
	answer = math.sin(math.radians(x))
	print("Синус угла {0} равен {1}" .format(x,answer))
 
elif (choose == "cos"):
	x = console("x - Градусы ")
	answer = math.cos(math.radians(x))
	print("Косинус угла {0} равен {1}" .format(x,answer))
 
elif (choose == "tg"):
	x = console("x - Градусы ")
	answer = math.tan(math.radians(x))
	print("Тангенс угла {0} равен {1}" .format(x,answer))
 
elif (choose == "ctg"):
	x = console("x - Градусы ")
	answer = 1 / math.tan(math.radians(x))
	print("Котангенс угла {0} равен {1}" .format(x,answer))
 
 
 
elif (choose == "kakaxa"):
	print ("Введите a,b,c с уравнения вида ax^2+bx+c = 0")
	a = console("Введите a ")
	b = console("Введите b ")
	c = console("Введите c ")
	d = math.pow(b,2) - 4 * a * c
	if d > 0:
		x1 = (-b + math.sqrt(d)) / 2*a
		x2 = (-b - math.sqrt(d)) / 2*a
		print("x1 = {0}. x2 = {1}".format(x1,x2))
	elif d == 0:
		x12 =(-b + math.sqrt(d)) / 2*a
		print("x =",x12)
	elif d < 0:
		print("Розвязков нимату")
Калькулятор обычный, синусы\косинусы и т.д, калькулятор квадратных уравнений без гуи.
i.imgur.com_GFO3Xr5.png

i.imgur.com_JmiLAGG.png

Код:
# -*- coding: cp1251 -*-
from Tkinter import *
import tkFileDialog
import math
import globino
 
root = Tk()
root.title(u'Калькулятор Стасика')
root.geometry('800x440+300+200') # ширина=500, высота=400, x=300, y=200
root.resizable(False, False)
 
def Btn(event):
	if globino.summer:
		textbox.delete('1.0', END)
		globino.summer = False
	lenght = len(textbox.get('1.0', END))
	textbox.insert("1."+ str(lenght),event)
 
def Btn1(event):
	a = textbox.get("1.0", END)
	textbox.delete('1.0', END)
	b = eval(a)
	textbox.insert("1.0", b)
	globino.summer = True
 
def Btn2(event):
 
	def square(event,textbox,textbox1,textbox2):
		aa = textbox.get('1.0',END)
		bb = textbox1.get('1.0',END)
		cc = textbox2.get('1.0',END)
		a = float(eval(aa))
		b = float(eval(bb))
		c = float(eval(cc))
		d = math.pow(b,2) - 4 * a * c
		if d > 0:
			x1 = (-b + math.sqrt(d)) / 2*a
			x2 = (-b - math.sqrt(d)) / 2*a
			label5 = Label(panelFrame2, text = str(x1), bg = '#ccc7c7',font='Arial 20')
			label5.place(x = 10,y = 10)
			label6 = Label(panelFrame2, text = str(x2), bg = '#ccc7c7',font='Arial 20')
			label6.place(x = 10,y = 20)
		elif d == 0:
			x12 =(-b + math.sqrt(d)) / 2*a
			print("x =",x12)
		elif d < 0:
			print("Розвязков нимату")
	
	root1 = Tk()
	root1.title(u'Калькулятор квадратных уравнений Стасика')
	root1.geometry('440x220+1120+200') # ширина=500, высота=400, x=300, y=200
	root1.resizable(False, False)
	panelFrame = Frame(root1, width = 440, height = 60, bg = '#ccc7c7')
	panelFrame2 = Frame(root1, width = 440, height = 160, bg = '#ccc7c7')
	textFrame = Frame(panelFrame, height = 40, width = 60)
	textFrame1 = Frame(panelFrame, height = 40, width = 60)
	textFrame2 = Frame(panelFrame, height = 40, width = 60)
	textbox = Text(textFrame, font = 'Arial 20')
	textbox.place(height=40,width=60)
	textbox1 = Text(textFrame1, font = 'Arial 20')
	textbox1.place(height=40,width=60)
	textbox2 = Text(textFrame2, font = 'Arial 20')
	textbox2.place(height=40,width=60)
	panelFrame.pack(side = 'top')
	panelFrame2.pack(side = 'bottom')
	textFrame.place(x = 20, y = 10)
	textFrame1.place(x = 160, y = 10)
	textFrame2.place(x = 270, y = 10)
	label = Label(panelFrame, text = "X^2", bg = '#ccc7c7',font='Arial 18')
	label.place(x = 85, y = 15)
	label1 = Label(panelFrame, text = "X", bg = '#ccc7c7',font='Arial 18')
	label1.place(x = 225, y = 15)
	label2 = Label(panelFrame, text = "+", bg = '#ccc7c7',font='Arial 20')
	label2.place(x = 130, y = 10)
	label3 = Label(panelFrame, text = "+", bg = '#ccc7c7',font='Arial 20')
	label3.place(x = 242, y = 10)
	label3 = Label(panelFrame, text = "=", bg = '#ccc7c7',font='Arial 20')
	label3.place(x = 340, y = 10)
	label4 = Label(panelFrame, text = "0", bg = '#ccc7c7',font='Arial 20')
	label4.place(x = 370, y = 10)
 
	button = Button(panelFrame2, text = "press", bg = '#ccc7c7',font='Arial 20')
	button.place(x = 10,y = 10)
	button.bind('<Button-1>', square(event,textbox,textbox1,textbox2))
	root1.mainloop()
 
def sin(degrees):
	a = math.sin(math.radians(degrees))
	return a
def cos(degrees):
	a = math.cos(math.radians(degrees))
	return a
def tg(degrees):
	a = math.tan(math.radians(degrees))
	return a
def ctg(degrees):
	a = 1 / math.tan(math.radians(degrees))
	return a
 
 
 
panelFrame = Frame(root, height = 400, width = 800, bg = "gray")
textFrame = Frame(root, height = 40, width = 800)
 
panelFrame.pack(side = 'bottom', fill = 'both', expand = 1)
textFrame.pack(side = 'top', fill = 'x', expand = 1)
 
textbox = Text(textFrame, font='Arial 20', wrap='word')
textbox.place(height=40,width=800)
 
btn = Button(panelFrame, text = "+", width = 8, height = 3,command= lambda: Btn("+"))
btn.place(x = 20, y = 40)
btn1 = Button(panelFrame, text = "-", width = 8, height = 3,command= lambda: Btn("-"))
btn1.place(x = 20, y = 140)
btn2 = Button(panelFrame, text = "/", width = 8, height = 3,command= lambda: Btn("/"))
btn2.place(x = 20, y = 240)
btn3 = Button(panelFrame, text = "*", width = 8, height = 3,command= lambda: Btn("*"))
btn3.place(x = 20, y = 340)
 
btn4 = Button(panelFrame, text = "sin", width = 8, height = 3,command= lambda: Btn("sin("))
btn4.place(x = 120, y = 40)
btn5 = Button(panelFrame, text = "cos", width = 8, height = 3,command= lambda: Btn("cos("))
btn5.place(x = 120, y = 140)
btn6 = Button(panelFrame, text = "tg", width = 8, height = 3,command= lambda: Btn("tg("))
btn6.place(x = 120, y = 240)
btn7 = Button(panelFrame, text = "ctg", width = 8, height = 3,command= lambda: Btn("ctg("))
btn7.place(x = 120, y = 340)
 
btn8 = Button(panelFrame, text = "1", width = 8, height = 3,command= lambda: Btn("1"))
btn8.place(x = 490, y = 40)
btn9 = Button(panelFrame, text = "4", width = 8, height = 3,command= lambda: Btn("4"))
btn9.place(x = 590, y = 140)
btn10 = Button(panelFrame, text = "7", width = 8, height = 3,command= lambda: Btn("7"))
btn10.place(x = 590, y = 240)
btn11 = Button(panelFrame, text = "2", width = 8, height = 3,command= lambda: Btn("2"))
btn11.place(x = 590, y = 40)
btn12 = Button(panelFrame, text = "5", width = 8, height = 3,command= lambda: Btn("5"))
btn12.place(x = 690, y = 140)
btn13 = Button(panelFrame, text = "8", width = 8, height = 3,command= lambda: Btn("8"))
btn13.place(x = 690, y = 240)
btn14 = Button(panelFrame, text = "3", width = 8, height = 3,command= lambda: Btn("3"))
btn14.place(x = 690, y = 40)
btn15 = Button(panelFrame, text = "6", width = 8, height = 3,command= lambda: Btn("6"))
btn15.place(x = 490, y = 140)
btn16 = Button(panelFrame, text = "9", width = 8, height = 3,command= lambda: Btn("9"))
btn16.place(x = 490, y = 240)
btn17 = Button(panelFrame, text = "0", width = 8, height = 3,command= lambda: Btn("0"))
btn17.place(x = 590, y = 340)
btn18 = Button(panelFrame, text = "=", width = 8, height = 23,command= lambda: Btn1("="))
btn18.place(x = 400, y = 40)
btn18 = Button(panelFrame, text = "(", width = 8, height = 3,command= lambda: Btn("("))
btn18.place(x = 220, y = 340)
btn18 = Button(panelFrame, text = ")", width = 8, height = 3,command= lambda: Btn(")"))
btn18.place(x = 310, y = 340)
btn19 = Button(panelFrame, text = "ax+bx+c", width = 21, height = 3,command= lambda: Btn2(""))
btn19.place(x = 220, y = 240)
root.mainloop()
Не доделан до конца. С гуи, кнопочками.
Код:
import smtplib
import sqlite3
 
def send_mail(e_mail, password, birthday,reg_time):
	print(e_mail, password, birthday,reg_time)
	to = e_mail
	gmail_user = 'dotabeetr@gmail.com'
	gmail_pwd = '1234zapara'
	smtpserver = smtplib.SMTP("smtp.gmail.com",587)
	smtpserver.ehlo()
	smtpserver.starttls()
	smtpserver.ehlo
	smtpserver.login(gmail_user, gmail_pwd)
	header = 'To:' + to + '\n' + 'From: ' + gmail_user + '\n' + 'Subject:program \n'
	msg = header +'Your Email is: '+ e_mail +\
	'\n'+"Your password is: " +password +\
	'\n'+"Your Password is: "+ birthday+\
	'\n'+"Your registration time is: " +reg_time
	smtpserver.sendmail(gmail_user, to, msg)
	print 'done!'
	smtpserver.close()
 
 
conn = sqlite3.connect("database.db")
c = conn.cursor()
 
 
while 1:
	c.execute('SELECT * FROM userbase')
	users = c.fetchall()
	for user in users:
		if (user[5] == 1):
			send_mail(str(user[1]),str(user[2]),str(user[3]),str(user[4]))
			c.execute('UPDATE userbase SET is_new = 0')
			conn.commit()
			print("DONE!")
	
 
conn.close()
Код:
import time
import smtplib
import user
import sqlite3
 
class User():
	def __init__(self):
		self.e_mail = raw_input("Enter Your Email ")
		self.password = raw_input("Enter Your Pass ")
		self.birthday =  raw_input("Enter Your Birthday ")
		self.reg_time = int(time.time())
 
conn = sqlite3.connect("database.db")
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS userbase (id INTEGER PRIMARY KEY AUTOINCREMENT,e_mail TEXT UNIQUE, pass TEXT, birth NUMERIC, reg_time NUMERIC, is_new INTEGER DEFAULT 1)')
 
a = 0
i = 1
while i == 1:
	a = a + 1
	confirm = raw_input("DO YOU WANT TO CONTINUE? y/n ")
	if (confirm.lower() == "y"):
		print("Enter User Data. Number: "+ str(a) +'\n')
		new_user = User()
		c.execute('INSERT INTO userbase (e_mail,pass,birth, reg_time) VALUES (?,?,?,?)',
		(new_user.e_mail, new_user.password, new_user.birthday, new_user.reg_time))
	
		print("\n")
		conn.commit()
	elif (confirm.lower() == "n"):
		print("GoodBye")
		i = 0
	else:
		print("Error")
		i = 0
 
 
conn.close()
3. Калькулятор допишу, а че дальше делать? Придумайте че-нить легкое, учусь ведь.
 
Последнее редактирование модератором:
  • Like
Реакции: _AMD_

_AMD_

Президент
ПРАВИТЕЛЬСТВО
26 Май 2015
4.103
1.998
283
Awards
9
127.0.0.1
trigon.im
SID
STEAM_0:1:55598730
1. Лысый
2.
realpython.com_learn_python_first_steps_images_pythonlogo.jpg
Код:
import math

def console(value):
    out = float(raw_input(value))
    return out

choose = raw_input("Если хочешь x^y\sin\cos\tg\ctg\sqrt\kakaxa \n")

if (choose == "x^y"):
    print("x - Число под степенем. y - Степень")
    x = console("Введи x ")
    y = console("Введи y ")
    answer = math.pow(x,y)
    print ("Ваш ответ: {0}" .format(answer))
elif (choose == "sqrt"):
    print("x - Число под коренем")
    #x = raw_input("Введи x ")
    x = console("Введи x ")
    answer = math.sqrt(x)
    print ("Ваш ответ: {0}" .format(answer))
elif (choose == "sin"):
    x = console("x - Градусы ")
    answer = math.sin(math.radians(x))
    print("Синус угла {0} равен {1}" .format(x,answer))

elif (choose == "cos"):
    x = console("x - Градусы ")
    answer = math.cos(math.radians(x))
    print("Косинус угла {0} равен {1}" .format(x,answer))

elif (choose == "tg"):
    x = console("x - Градусы ")
    answer = math.tan(math.radians(x))
    print("Тангенс угла {0} равен {1}" .format(x,answer))

elif (choose == "ctg"):
    x = console("x - Градусы ")
    answer = 1 / math.tan(math.radians(x))
    print("Котангенс угла {0} равен {1}" .format(x,answer))



elif (choose == "kakaxa"):
    print ("Введите a,b,c с уравнения вида ax^2+bx+c = 0")
    a = console("Введите a ")
    b = console("Введите b ")
    c = console("Введите c ")
    d = math.pow(b,2) - 4 * a * c
    if d > 0:
        x1 = (-b + math.sqrt(d)) / 2*a
        x2 = (-b - math.sqrt(d)) / 2*a
        print("x1 = {0}. x2 = {1}".format(x1,x2))
    elif d == 0:
        x12 =(-b + math.sqrt(d)) / 2*a
        print("x =",x12)
    elif d < 0:
        print("Розвязков нимату")
Калькулятор обычный, синусы\косинусы и т.д, калькулятор квадратных уравнений без гуи.
i.imgur.com_GFO3Xr5.png

i.imgur.com_JmiLAGG.png

Код:
# -*- coding: cp1251 -*-
from Tkinter import *
import tkFileDialog
import math
import globino

root = Tk()
root.title(u'Калькулятор Стасика')
root.geometry('800x440+300+200') # ширина=500, высота=400, x=300, y=200
root.resizable(False, False)

def Btn(event):
    if globino.summer:
        textbox.delete('1.0', END)
        globino.summer = False
    lenght = len(textbox.get('1.0', END))
    textbox.insert("1."+ str(lenght),event)

def Btn1(event):
    a = textbox.get("1.0", END)
    textbox.delete('1.0', END)
    b = eval(a)
    textbox.insert("1.0", b)
    globino.summer = True

def Btn2(event):

    def square(event,textbox,textbox1,textbox2):
        aa = textbox.get('1.0',END)
        bb = textbox1.get('1.0',END)
        cc = textbox2.get('1.0',END)
        a = float(eval(aa))
        b = float(eval(bb))
        c = float(eval(cc))
        d = math.pow(b,2) - 4 * a * c
        if d > 0:
            x1 = (-b + math.sqrt(d)) / 2*a
            x2 = (-b - math.sqrt(d)) / 2*a
            label5 = Label(panelFrame2, text = str(x1), bg = '#ccc7c7',font='Arial 20')
            label5.place(x = 10,y = 10)
            label6 = Label(panelFrame2, text = str(x2), bg = '#ccc7c7',font='Arial 20')
            label6.place(x = 10,y = 20)
        elif d == 0:
            x12 =(-b + math.sqrt(d)) / 2*a
            print("x =",x12)
        elif d < 0:
            print("Розвязков нимату")
    
    root1 = Tk()
    root1.title(u'Калькулятор квадратных уравнений Стасика')
    root1.geometry('440x220+1120+200') # ширина=500, высота=400, x=300, y=200
    root1.resizable(False, False)
    panelFrame = Frame(root1, width = 440, height = 60, bg = '#ccc7c7')
    panelFrame2 = Frame(root1, width = 440, height = 160, bg = '#ccc7c7')
    textFrame = Frame(panelFrame, height = 40, width = 60)
    textFrame1 = Frame(panelFrame, height = 40, width = 60)
    textFrame2 = Frame(panelFrame, height = 40, width = 60)
    textbox = Text(textFrame, font = 'Arial 20')
    textbox.place(height=40,width=60)
    textbox1 = Text(textFrame1, font = 'Arial 20')
    textbox1.place(height=40,width=60)
    textbox2 = Text(textFrame2, font = 'Arial 20')
    textbox2.place(height=40,width=60)
    panelFrame.pack(side = 'top')
    panelFrame2.pack(side = 'bottom')
    textFrame.place(x = 20, y = 10)
    textFrame1.place(x = 160, y = 10)
    textFrame2.place(x = 270, y = 10)
    label = Label(panelFrame, text = "X^2", bg = '#ccc7c7',font='Arial 18')
    label.place(x = 85, y = 15)
    label1 = Label(panelFrame, text = "X", bg = '#ccc7c7',font='Arial 18')
    label1.place(x = 225, y = 15)
    label2 = Label(panelFrame, text = "+", bg = '#ccc7c7',font='Arial 20')
    label2.place(x = 130, y = 10)
    label3 = Label(panelFrame, text = "+", bg = '#ccc7c7',font='Arial 20')
    label3.place(x = 242, y = 10)
    label3 = Label(panelFrame, text = "=", bg = '#ccc7c7',font='Arial 20')
    label3.place(x = 340, y = 10)
    label4 = Label(panelFrame, text = "0", bg = '#ccc7c7',font='Arial 20')
    label4.place(x = 370, y = 10)

    button = Button(panelFrame2, text = "press", bg = '#ccc7c7',font='Arial 20')
    button.place(x = 10,y = 10)
    button.bind('<Button-1>', square(event,textbox,textbox1,textbox2))
    root1.mainloop()

def sin(degrees):
    a = math.sin(math.radians(degrees))
    return a
def cos(degrees):
    a = math.cos(math.radians(degrees))
    return a
def tg(degrees):
    a = math.tan(math.radians(degrees))
    return a
def ctg(degrees):
    a = 1 / math.tan(math.radians(degrees))
    return a



panelFrame = Frame(root, height = 400, width = 800, bg = "gray")
textFrame = Frame(root, height = 40, width = 800)

panelFrame.pack(side = 'bottom', fill = 'both', expand = 1)
textFrame.pack(side = 'top', fill = 'x', expand = 1)

textbox = Text(textFrame, font='Arial 20', wrap='word')
textbox.place(height=40,width=800)

btn = Button(panelFrame, text = "+", width = 8, height = 3,command= lambda: Btn("+"))
btn.place(x = 20, y = 40)
btn1 = Button(panelFrame, text = "-", width = 8, height = 3,command= lambda: Btn("-"))
btn1.place(x = 20, y = 140)
btn2 = Button(panelFrame, text = "/", width = 8, height = 3,command= lambda: Btn("/"))
btn2.place(x = 20, y = 240)
btn3 = Button(panelFrame, text = "*", width = 8, height = 3,command= lambda: Btn("*"))
btn3.place(x = 20, y = 340)

btn4 = Button(panelFrame, text = "sin", width = 8, height = 3,command= lambda: Btn("sin("))
btn4.place(x = 120, y = 40)
btn5 = Button(panelFrame, text = "cos", width = 8, height = 3,command= lambda: Btn("cos("))
btn5.place(x = 120, y = 140)
btn6 = Button(panelFrame, text = "tg", width = 8, height = 3,command= lambda: Btn("tg("))
btn6.place(x = 120, y = 240)
btn7 = Button(panelFrame, text = "ctg", width = 8, height = 3,command= lambda: Btn("ctg("))
btn7.place(x = 120, y = 340)

btn8 = Button(panelFrame, text = "1", width = 8, height = 3,command= lambda: Btn("1"))
btn8.place(x = 490, y = 40)
btn9 = Button(panelFrame, text = "4", width = 8, height = 3,command= lambda: Btn("4"))
btn9.place(x = 590, y = 140)
btn10 = Button(panelFrame, text = "7", width = 8, height = 3,command= lambda: Btn("7"))
btn10.place(x = 590, y = 240)
btn11 = Button(panelFrame, text = "2", width = 8, height = 3,command= lambda: Btn("2"))
btn11.place(x = 590, y = 40)
btn12 = Button(panelFrame, text = "5", width = 8, height = 3,command= lambda: Btn("5"))
btn12.place(x = 690, y = 140)
btn13 = Button(panelFrame, text = "8", width = 8, height = 3,command= lambda: Btn("8"))
btn13.place(x = 690, y = 240)
btn14 = Button(panelFrame, text = "3", width = 8, height = 3,command= lambda: Btn("3"))
btn14.place(x = 690, y = 40)
btn15 = Button(panelFrame, text = "6", width = 8, height = 3,command= lambda: Btn("6"))
btn15.place(x = 490, y = 140)
btn16 = Button(panelFrame, text = "9", width = 8, height = 3,command= lambda: Btn("9"))
btn16.place(x = 490, y = 240)
btn17 = Button(panelFrame, text = "0", width = 8, height = 3,command= lambda: Btn("0"))
btn17.place(x = 590, y = 340)
btn18 = Button(panelFrame, text = "=", width = 8, height = 23,command= lambda: Btn1("="))
btn18.place(x = 400, y = 40)
btn18 = Button(panelFrame, text = "(", width = 8, height = 3,command= lambda: Btn("("))
btn18.place(x = 220, y = 340)
btn18 = Button(panelFrame, text = ")", width = 8, height = 3,command= lambda: Btn(")"))
btn18.place(x = 310, y = 340)
btn19 = Button(panelFrame, text = "ax+bx+c", width = 21, height = 3,command= lambda: Btn2(""))
btn19.place(x = 220, y = 240)
root.mainloop()
Не доделан до конца. С гуи, кнопочками.
Код:
import smtplib
import sqlite3

def send_mail(e_mail, password, birthday,reg_time):
    print(e_mail, password, birthday,reg_time)
    to = e_mail
    gmail_user = 'dota2beetor@gmail.com'
    gmail_pwd = 'papara1111'
    smtpserver = smtplib.SMTP("smtp.gmail.com",587)
    smtpserver.ehlo()
    smtpserver.starttls()
    smtpserver.ehlo
    smtpserver.login(gmail_user, gmail_pwd)
    header = 'To:' + to + '\n' + 'From: ' + gmail_user + '\n' + 'Subject:program \n'
    msg = header +'Your Email is: '+ e_mail +\
    '\n'+"Your password is: " +password +\
    '\n'+"Your Password is: "+ birthday+\
    '\n'+"Your registration time is: " +reg_time
    smtpserver.sendmail(gmail_user, to, msg)
    print 'done!'
    smtpserver.close()


conn = sqlite3.connect("database.db")
c = conn.cursor()


while 1:
    c.execute('SELECT * FROM userbase')
    users = c.fetchall()
    for user in users:
        if (user[5] == 1):
            send_mail(str(user[1]),str(user[2]),str(user[3]),str(user[4]))
            c.execute('UPDATE userbase SET is_new = 0')
            conn.commit()
            print("DONE!")
    

conn.close()
Код:
import time
import smtplib
import user
import sqlite3

class User():
    def __init__(self):
        self.e_mail = raw_input("Enter Your Email ")
        self.password = raw_input("Enter Your Pass ")
        self.birthday =  raw_input("Enter Your Birthday ")
        self.reg_time = int(time.time())

conn = sqlite3.connect("database.db")
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS userbase (id INTEGER PRIMARY KEY AUTOINCREMENT,e_mail TEXT UNIQUE, pass TEXT, birth NUMERIC, reg_time NUMERIC, is_new INTEGER DEFAULT 1)')

a = 0
i = 1
while i == 1:
    a = a + 1
    confirm = raw_input("DO YOU WANT TO CONTINUE? y/n ")
    if (confirm.lower() == "y"):
        print("Enter User Data. Number: "+ str(a) +'\n')
        new_user = User()
        c.execute('INSERT INTO userbase (e_mail,pass,birth, reg_time) VALUES (?,?,?,?)',
        (new_user.e_mail, new_user.password, new_user.birthday, new_user.reg_time))
    
        print("\n")
        conn.commit()
    elif (confirm.lower() == "n"):
        print("GoodBye")
        i = 0
    else:
        print("Error")
        i = 0


conn.close()
3. Калькулятор допишу, а че дальше делать? Придумайте че-нить легкое, учусь ведь.
Питончик). Начинал его учить, а потом забил т.к. не придумал зачем он мне. Скоро вернусь к нему опять. Выдал
 

Only

Снова чёт делает
ПРАВИТЕЛЬСТВО
22 Янв 2016
453
120
202
Awards
16
23
Москва
1. One shoot- one kill :D
2. autoit3
upload_2016-2-12_19-48-43.png

3. Собираю коллекцию + учусь писать скрипты и тд , думаю autoit3 подойдёт для начала
[doublepost=1455296410][/doublepost]( ДОПОЛНЕНИЕ )
upload_2016-2-12_19-59-56.png
 

_AMD_

Президент
ПРАВИТЕЛЬСТВО
26 Май 2015
4.103
1.998
283
Awards
9
127.0.0.1
trigon.im
SID
STEAM_0:1:55598730

_AMD_

Президент
ПРАВИТЕЛЬСТВО
26 Май 2015
4.103
1.998
283
Awards
9
127.0.0.1
trigon.im
SID
STEAM_0:1:55598730

_AMD_

Президент
ПРАВИТЕЛЬСТВО
26 Май 2015
4.103
1.998
283
Awards
9
127.0.0.1
trigon.im
SID
STEAM_0:1:55598730
Чёрный маркер - доказательство того, что это написал я.
Мб просто в тырнете нашел)
Напиши задачу, которая будет выводить числа по принципу 1, 2, 4, 8, 16, 32, 64, 128, 256 и т.д.
Не скажу как это называется, чтобы ты не гуглил. Задача простенькая.
 
  • Like
Реакции: Dantee

Drow_Ranger

Обычный гражданин
Гражданин
Мб просто в тырнете нашел)
Напиши задачу, которая будет выводить числа по принципу 1, 2, 4, 8, 16, 32, 64, 128, 256 и т.д.
Не скажу как это называется, чтобы ты не гуглил. Задача простенькая.
Снимок.PNG

Это геометрическая прогрессия.
program n1;
uses crt;
var x:integer;
begin
clrscr;
x:=1;
while x>0 do begin
x:=x*2;
writeln(x);
end;
end.
Результат:
Снимок.PNG
 
Последнее редактирование:

_AMD_

Президент
ПРАВИТЕЛЬСТВО
26 Май 2015
4.103
1.998
283
Awards
9
127.0.0.1
trigon.im
SID
STEAM_0:1:55598730

IronAbatu

Кто-то
Иммигрант
9 Мар 2016
38
2
35
Awards
7
21
undefined
undefined
SID
STEAM_0:1:116934912
Мб просто в тырнете нашел)
Напиши задачу, которая будет выводить числа по принципу 1, 2, 4, 8, 16, 32, 64, 128, 256 и т.д.
Не скажу как это называется, чтобы ты не гуглил. Задача простенькая.
а я думал ты задумал цикл x=1 , потом он с каждым разом будет умножать x2 будет 2x = 2 потом это же ещё на 2 4x = 4 ну или заставил 2 возводить себя в степень бесконечно
 

RCheg

Кто-то
Иммигрант
4 Июн 2016
38
1
8
Awards
1
26
1. Painis Cupcake
2. Клео скрипты используют для GTA от III-IV. На нем чаще делают читы.
Код:
{$CLEO .cs}
0000:
while 04AD: is_char_in_water $Player_Actor
then
    03FE: set_char_money 1@ to 22813370
    end
end
if
00DF: is_char_in_any_car
then
     0322: kill_player $Player_Actor
     wait 6000
     Actor.PutAt($Player_Actor, 0.0, 0.0, 0.0)
     end
end

3. Недо-клео скрипт. Поскольку мой GTA SA не работает по каким-то причинам, я не могу его проверить. Еще из-за форуме у меня немного сдвинулся скрипт в некоторых местах, ну и ладно.
Как он работает: Тут несколько функций, а если точнее - только две.

Все начинается с {$CLEO}. .cs писать необязательно. Некоторые скрипты начинаются с {$VERSION}, но это уже совсем другая история.
Дальше идет ОПКОД 0000. Он нужен, чтобы работали остальные опкоды (По крайней мере в моей версии SB). Дальше идет: "Если Игровой_Персонаж находится в воде, тогда Игровому_Персонажу выставляется кол-во денег 22813370$. Конец". Вот так работает эта функция. Затем идет следующая функция: Если персонаж сел в любую машину, тогда его убивает. После этого скрипт ждет 6 секунд (6000мс) и отправляет его в координаты по нулям. На этом скрипт заканчивается.
Теперь вы спросите: Зачем я сделал этот недо-скрипт? А просто так. Мне нравится, когда я умираю садясь в машину, и когда мне дают 22813370 долларов.
 

RCheg

Кто-то
Иммигрант
4 Июн 2016
38
1
8
Awards
1
26
И вот еще один пример, текст:
Код:
{$CLEO}
0000:

while true
wait 0
     if
     0117:   is_player_dead $PLAYER_CHAR
     then
         0AD0: print_formatted "POOTISPENSERHERE" time 0 0x0AD0
         wait 2000
         0AD0: print_formatted "Ìàñëèíó ïîéìàë" time 2000 0x0AD0
         end
     end   
end

while true
wait 0
     if
     00DF:   is_char_in_any_car $PLAYER_ACTOR
     then
         0519: freeze_car_position set_to 1
         04D7: freeze_char_position $PLAYER_ACTOR set_to 1
         and       
         0AD0: print_formatted "Твоя машина: NVIDIA лучше." time 1000 0x0AD0       
         0AD0: print_formatted "_AMD_: Нет, AMD лучше" time 2000 0x0AD0
         0AD0: print_formatted "Твоя машина: Закрой свою булочную!" time 3000 0x0AD0
         0AD0: print_formatted "_AMD_: Ты ща огребешь, урод!!" time 4000 0x0AD0
         0AD0: print_formatted "Твоя машина: На _AMD_ можно сделать сильно прожаренный стейк" time 5000 0x0AD0
         0AD0: print_formatted "Ну все, получай, сучара!!" time 6000 0x0AD0
         wait 2000
         0321: explode_char_head $PLAYER_CHAR
         0AD0: print_formatted "Я промахнулся..." time 8500 0x0AD0
         04D7: freeze_char_position $PLAYER_ACTOR set_to 0
         0519: freeze_car_position set_to 1
         end
     end   
end 

while true 
wait 0
00E1:   is_button_pressed 0 button 19
0AD0: print_formatted "/ban player: "Твоя машина" time: (perm) reas: аморальные шуточки" time 1000 0x0AD0
 
Последнее редактирование: