Artem0317q
29.10.2020 10:56

Granite Male Enhancement : Boost The Sex Drive & Sexual Sensitivity

As someone this works with Granite Male Enhancement, I know how significant it is to actually be able to identify a conspiracy. In this case, the cost involved makes that option beyond the reach of most Americans. It was fried. This is how to quit worrying with reference to my sneaking suspicion. This is how to purchase Granite Male Enhancement Review. I've wanted to check out different using it but have been uncertain relating to your sphere of activity. There are almost no inclinations in that field. We've had our ups and downs. How would we do it? Nevertheless, use your head when it is linked to it and you'll be typical. The components of a Granite Male Enhancement Review that provides a trend for a Granite Male Enhancement. It's easy to be successful at doing it. Honestly, do connoisseurs use this annex. How do wanderers collect first-class Granite Male Enhancement solutions? I have this in mind right now. You don't have to miss out, do you?

https://granite-male-enhancement-91.webself.net/

https://www.completefoods.co/diy/recipes/granite-male-enhancement-boost-the-sex-drive-sexual-sensitivity

https://charity.gofundme.com/o/en/campaign/granite-male-enhancement-scam-alert-granite-pills-shocking-revelation

Нажмите на рекламу ниже и сразу увидите ответ
↓
Популярные вопросы:
Ответ:
Юлькач
14.08.2020 11:19

from tkinter import *

class Main(Frame):

   def __init__(self, root):

       super(Main, self).__init__(root)

       self.build()

   def build(self):

       self.formula = "0"

       self.lbl = Label(text=self.formula, font=("Times New Roman", 21, "bold"), bg="#000", foreground="#FFF")

       self.lbl.place(x=11, y=50)

       btns = [

           "C", "DEL", "*", "=",

           "1", "2", "3", "/",

           "4", "5", "6", "+",

           "7", "8", "9", "-",

           "(", "0", ")", "X^2"

       ]

       x = 10

       y = 140

       for bt in btns:

           com = lambda x=bt: self.logicalc(x)

           Button(text=bt, bg="#FFF",

                  font=("Times New Roman", 15),

                  command=com).place(x=x, y=y,

                                     width=115,

                                     height=79)

           x += 117

           if x > 400:

               x = 10

               y += 81

   def logicalc(self, operation):

       if operation == "C":

           self.formula = ""

       elif operation == "DEL":

           self.formula = self.formula[0:-1]

       elif operation == "X^2":

           self.formula = str((eval(self.formula))**2)

       elif operation == "=":

           self.formula = str(eval(self.formula))

       else:

           if self.formula == "0":

               self.formula = ""

           self.formula += operation

       self.update()

   def update(self):

       if self.formula == "":

           self.formula = "0"

       self.lbl.configure(text=self.formula)

if __name__ == '__main__':

   root = Tk()

   root["bg"] = "#000"

   root.geometry("485x550+200+200")

   root.title("Калькулятор")

   root.resizable(False, False)

   app = Main(root)

   app.pack()

   root.mainloop()

Объяснение:

1.Создаём окно 485 на 550. Размеры не важны, мне понравились такие. Так же указываем, что окно не будет изменяться.

class Main(Frame):

   def __init__(self, root):

       super(Main, self).__init__(root)

       self.build()

   def build(self):

       pass

 

   def logicalc(self, operation):

       pass

   def update():

      pass

if __name__ == '__main__':

   root = Tk()

   root["bg"] = "#000"

   root.geometry("485x550+200+200")

   root.title("Калькулятор")

   root.resizable(False, False)

   app = Main(root)

   app.pack()

   root.mainloop()

2.Делаем кнопочки

В методе build создаём такой список:

btns = [

           "C", "DEL", "*", "=",

           "1", "2", "3", "/",

           "4", "5", "6", "+",

           "7", "8", "9", "-",

           "+/-", "0", "%", "X^2"

       ]

Он отвечает за все кнопки, отображающиеся у нас в окне.

3.Мы создали список, теперь проходимся циклом и отображаем эти кнопки. Для этого в том же методе пишем следующее:

x = 10

       y = 140

       for bt in btns:

           com = lambda x=bt: self.logicalc(x)

           Button(text=bt, bg="#FFF",

                  font=("Times New Roman", 15),

                  command=com).place(x=x, y=y,

                                     width=115,

                                     height=79)

           x += 117

           if x > 400:

               x = 10

               y += 81

4.Замечательно, у нас есть кнопочки. Добавляем надпись с выводом результата. Я хочу что бы текст был слева, следовательно, атрибутов выравнивания текста писать не нужно.

self.formula = "0"

self.lbl = Label(text=self.formula, font=("Times New Roman", 21, "bold"),

                bg="#000", foreground="#FFF")

self.lbl.place(x=11, y=50)

5.Пишем логику

def logicalc(self, operation):

   if operation == "C":

       self.formula = ""

   elif operation == "DEL":

       self.formula = self.formula[0:-1]

   elif operation == "X^2":

       self.formula = str((eval(self.formula))**2)

   elif operation == "=":

       self.formula = str(eval(self.formula))

   else:

       if self.formula == "0":

           self.formula = ""

       self.formula += operation

   self.update()

def update(self):

   if self.formula == "":

       self.formula = "0"

   self.lbl.configure(text=self.formula)

Так, как у нас нет ввода с клавиатуры, мы можем позволить себе сделать так, просто проверить на спец. кнопки (C, DEL, =) и в остальных случаях просто добавить это к формуле.

за внимание!)

0,0(0 оценок)
Ответ:
armanshinaelin
20.12.2021 16:26
Дано:
Палитра 256 цветов.
Размер 10x10 пикселей.

Найти:
Каков информационный объём этого файла?

Решение:
Вначале определяем глубину цвета по формуле
2^i = N. 2^i = 256 по условию, отсюда i = 8 бит.

Вычисляем общее количество пикселей в картинке:
10*10 = 100 пикселей

Информационный объём равен
100 пикселей * 8 бит = 800 бит.



Дано:
разрешающая экрана 1440*900 точек
глубина цвета 32 бит

Найти:
объём графического изображения

Решение:
Вначале вычисляем общее количество пикселей в картинке:
1440 * 900 = 1 296 000 пикселей.

Информационный объем вычисляется по формуле
Объем = количество пикселей * глубина цвета
Объем = 1 296 000 * 32 бит = 41 472 000 бит
Делим на 8 бит в байте, 41 472 000 / 8 = 5 184 000 байт
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота