"""
1- syntax
2- run-time
3- logical: final result unexpected 

test suite inputs & extected outputs

x = 5
print(id(x)) #address
print(type(x)) # type

# + - prio.  2+3-4 


x = 5
if x == 5:
    pass
elif x == 6:
    pass

# ternary operator

print(1+2) if '2'.isalpha() else print(1-2)

x =   int(  input("Enter a number: ") ) * 2 #string
print(x)



# for  used with sequence list tuple dictionary  string 

# while condition to False 
# 

name = ["a", "b", "c"]

x = 6

for i in name:  # max -1
    print(i.upper())
    x -= 1
    if x == 1:
        break
print(name) 


l = [3, [4, 9, 1], 8] #access using index
for i in l: 
    print(i.upper())

print(l * 1)

print( l[1][1] )


d = { 9:"val1" , 2:"val2" } #access using keys

print(d[1])

for i in d.values():
    print(i)

print( sorted(d.keys()) )

d2 = { 9:"val1" , 2:{ 5: "sval2", 6:"sval3"} } 

for i in d2.values():
    print(i)

print(d2[2][6])




def myfunc( a, b ):
    z = a + b
    return z  #none   value

x = myfunc(2, 3)
print(x)
v = x * 4


def test():
    global x
    x = 3 #local
    print("x inside fun = ", x)
    return x + 1

x = 5
print("x in global = ", x)

print( test() )

print("x after fun = ", x)


def myfunc( a , b = 3  ):
    print(a, b)

myfunc(2)
myfunc(2, 6)


def test(name):
    x = [3, 8, 1, 0]
    print(  name(x)    )

test( sorted  )


def test( *numbers ): #numbers[1, 2, 3, 4, 5, 6]
    res = 0
    for i in numbers:
        res += i
    return res

print( test(1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 56, 6, 7)  )


def test():
    print("helloo")

test2 = test

test()
test2()



z = lambda x, y : x + y 

print(  z(2, 4)  )

recurisive funcs X
modules X



class test:
    var1 = "val1"  #class attrr.
    def __init__(self):
        self.a = 5 # instance attrr.
    def testfunc(self):
        return 1
    def testfunc(self):
        return 2


t1 = test()

print(t1.testfunc())


class test:
    var1 = "val1"  #class attrr.
    def __init__(self):
        self.a = 5 # instance attrr.
    def testfunc(self):
        return 1

class testchild(test):
    def testfunc(self):  #function overriding
        return 56

c = testchild()
print( c.testfunc() )

 
#user-defined 
class test:  
    var1 = "val1"  #class attrr.
    def __init__(self, a= 5):
        self.a = a # instance attrr.
    def testfunc(self):
        return 1
    def __add__(self, other):
        return self.a + other.a

t1 = test()
t2 = test(1)

print(t1 + t2)


# file open     r    w    a

try:
  file  = open ("data.txt",  "r")
finally:
    file.close()
    print("closed")
"""

import tkinter


x = tkinter.Label( parentfarme ,  text="skdjfyksjdfhk").pack(side = tkinter.LEFT) 
                                                       .grid(row= )
                                                       .place(x, y)     