Skip to content

Instantly share code, notes, and snippets.

@Otojon
Created January 30, 2022 16:10
Show Gist options
  • Save Otojon/5ef08c0a2972648987a1d44aed2d8ec1 to your computer and use it in GitHub Desktop.
Save Otojon/5ef08c0a2972648987a1d44aed2d8ec1 to your computer and use it in GitHub Desktop.
experience
'''age=21
#age+=1
print('your age is '+ str(age)'''
# from typing import Tuple
# import my_first_module
''' height=250.5
print(height)
print(type(height))
print('your heightis '+ str(height))'''
'''name,age,attractive='otojon',18,'Trueo'
print(name)
print(age)
print(attractive)'''
'''name = 'otajon coding '
print(len(name))
print(name.find('o'))
print(name.capitalize())
print(name.upper())
print(name.lower())
print(name.isalpha())
print(name.count('a'))
print(name.replace('o','a'))
print(name*8)'''
'''x=1
y=2.0
z='3'
y=int(y)
z=int(z)
print(z*7)
print(y)
print(x)'''
'''name=input('what is ur name: ')
age=float(input('hpw old areu" '))
age=age+1
height=float(input('how tall are u '))
print('hello'+name)
print('hi' + str(age))
print(height)'''
'''fruits = ["orange",
"mango",
"banana"]
print(fruits)'''
'''a = 3
b = 21
c = 'oybek'
d = 5.21
e = 4.21j
f = 5.33j
print(type(a))
print(type(b))
print(type(c))
print(type(d))
print(type(e))
print(type(f))'''
'''pi = 3.1415926535897 # this is the pi number
two_decimals = round(pi, 2)
three_decimals = round(pi, 3)
print(two_decimals)
print(three_decimals)'''
'''x = pow(4, 2) # same as 4 * 4
y = pow(58, 21) # same as 4 * 4 * 4
print(x)
print(y)
'''
# this will NOT produce a syntax error
'''text = 'Let\'s learn Python'
print(text)'''
'''text = "Hi everyone"
print(text[-1]) # prints e
print(text[-2]) # prints n'''
'''x = 21
text = "My favorite number is " +str( x)
print(text)'''
'''x = "Hello "
y = "World!"
x += y # same as x = x + y
print(x)'''
'''x = 5
x %= 2 # same as x = x % 2
print(x)'''
'''x = "python" == "python'''
'''pets = ["dog", "cat", "rabbit", "fish", "hamster"]
x = pets[2:] # ['dog', 'cat']
print(x)'''
'''pets = ["dog", "cat"]
pets.append("rabbit")
pets.insert(0, 'man')
pets.pop()
print(pets)'''
'''nums1 = [1, 2, 3]
nums2 = [4, 5, 6]
nums1.extend(nums2)
print(nums1)'''
'''pets = tuple(("dog", "cat", "rabbit"))
# take note of the double brackets
print(pets)'''
'''pets = ("dog", "cat", "rabbit")
print(pets[0])
print(pets[1])
print(pets[2])
'''
'''pets = ("dog", "cat", "rabbit", "fish", "hamster")
x = pets[1:3] # ('cat', 'rabbit')
print(x)'''
'''pets = ("dog", "cat", "rabbit", "fish", "hamster")
x = pets[:2] # ('dog', 'cat')
print(x)
'''
'''pets = ("dog", "cat", "rabbit")
for i in pets:
print(i)'''
#problems with for loop
'''pets1 = ("dog", "cat", "rabbit")
pets2 = ("fish", "bird", "hamster")
all_pets = pets1 + pets2
print(all_pets)'''
'''pets = {"dog", "cat", "rabbit" , True,21}
print(pets)
pets = {"dog", "cat", "rabbit"}
pets.update("fish")
pets.remove('rabbit')
print(pets)
'''
'''x = [1, 2, 3, 4]
y = [4, 5, 6]
z=x+y
print(z)
'''
'''x = {1, 2, 3, 4}
y = {3, 4, 5, 6}
print("x - y:", x - y)
print("y - x:", y - x)
'''
'''person={
'first name':'Otojon',
'last name': 'Xudayarov',
'age': 18
}
#a=person['first name']
#b=person['last name']
#c=person['age']
person['age']=48
#print('First name:',a)
#rint('Last name:',b)
#print('Age:',c)
#print(person.get('first name'))
print(person) '''
'''person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
person["first_name"] = "Jane"
print(person)'''
'''person = {"first_name": "John",
"last_name": "Doe",
"age": 30}
# del person["age"]
if 'age' in person:
print('hello') '''
'''person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
for key in person:
print(person[key])
'''
'''person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
person.pop("age")
print(person)
'''
'''person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
del person["age"]
print(person)
'''
'''person = {
"first_name": "John",
"last_name": "Doe",
"age": 30
}
for q in person:
print(person[q])
'''
#functions
'''def my_func():
x = "Hello World!"
print(x)
my_func()
'''
'''def my_func():
x = "love python programming"
print(x) # this produces an error
# call the function
my_func()
'''
'''def hello(name):
x = "Hello " + name
print(x)
hello("John")
'''
'''def add(n1,n2):
sum=n1+n2
print(sum)
add(-4,30)
'''
'''def add_nums(num1, num2):
sum = num1 + num2
print(sum)
add_nums(4, 3)
'''
'''def hello(name='paul'):
x = "Hello " + name
print(x)
hello("John")
hello('oybek')
hello('qwerty')
hello()
'''
'''def my_func(fruit1, fruit2, fruit3):
print("I love :", fruit1)
print("I love :", fruit2)
print("I love :", fruit3)
my_func(fruit3 = "grapes", fruit2 = "apples", fruit1 = "bananas")
'''
'''def add_nums(num1, num2):
sum = num1 + num2
return sum
print(add_nums(6,7))
print(add_nums(4,3))
'''
'''def add(x, y):
return x+y
print(add(10, 5))
'''
'''add = lambda x, y: x + y
print(add(10, 5))
level=lambda a,b,c,d: a*b*c*d
print(level(3,3,4,9))
'''
'''x = 10
y = 5
if x > y:
str = "Hello World!"
print(str)
'''
'''x = 15
if x > 5:
print("x is more than 5")
if x > 10:
print("x is more than 10")
else:
print("x is NOT more than 5")
if x>4:
print('JERHOGHOIERHG')
'''
'''x = 10
print("x is 10") if x == 10 else print("x is not 10")
'''
'''people = ["Juan", "Maria", "Elena"]
for person in people:
print(person)'''
'''txt = "Hello World!"
for x in txt:
print(x)
'''
#for y in range(3):
# print("Hello World!")
'''for x in range(90):
print(x,'calculator',x,x**x)
'''
'''txt='bye world'
for x in range(300):
print(txt)
'''
'''animal = ["tiger", "cat", "dog"]
sound = ["roars", "meows", "barks"]
for x in animal:
for y in sound:
print("the " + x + " " + y)
'''
'''numbers=['n1','n2','n3','n4']
words=['word1','word2','word3','word4']
for x in numbers:
for y in words:
print(x+' '+y)
'''
'''for x in range(3):
print("Hello World!",x)
else:
print("Loop has ended!")
'''
'''i=7
while i < 8 and i>0:
print(i,'bir',i,'ikki')
i -= 1
'''
'''pets = ["dogs", "cats", "rabbits"]
for pet in pets:
print(pet)
if pet == "cats":
continue
'''
'''i = 1
while i <= 5:
if i==3:
break
print(i)
i += 1
'''
'''i=int(input('sonni yoz: '))
while i<5:
print(i**i)
break
if i>6:
print(i*i)
'''
'''i = 0
while i < 5:
i += 1
if i!=2:
continue
print(i)
'''
#pass_Statement aaaa i found it from google "The pass statement is useful when you don't write the implementation of a function but you want to implement it in the future."
'''if 5 == 5:
pass
else:
pass
pets = ["cat", "dog", "rabbit"]
for pet in pets:
pass
class Student:
pass
print("Hello World!")
'''
# Change this value for a different result
'''c = '|'
# Uncomment to take character from user
#c = input("Enter a character: ")
print("The ASCII value of '" + c + "' is",ord(c))
'''
'''class Person:
first_name = "John"
last_name = "Doe"
age = 30
obj = Person()
# access its properties
print(obj.first_name)
print(obj.last_name)
print(obj.age)
print(obj.age)
'''
''' class Student:
def __init__(hello, id_number, name, age):
hello.id_number = id_number
hello.name = name
hello.age = age
Student1 = Student(1234, "John Doe", 19)
x = Student1.id_number
y = Student1.name
z = Student1.age
print("Student ID:", x)
print("Student Name:", y)
print("Student Age:", z)
'''
'''class Student:
def __init__(self, id_number, name, age):
self.id_number = id_number
self.name = name
self.age = age
Student1 = Student(5243, "Mary Doe", 18)
Student2 = Student(3221, "John Doe", 18)
print("Student 1 ID:", Student1.id_number)
print("Student 1 Name:", Student1.name)
print("Student 1 Age:", Student1.age)
print("---------------------")
print("Student 2 ID:", Student2.id_number)
print("Student 2 Name:", Student2.name)
print("Student 2 Age:", Student2.age)
'''
'''class Student:
def __init__(self,id_number,name,surname,age):
self.id_number=id_number
self.name=name
self.age=age
self.surname=surname
def greet_Student(self):
print("hello",self.name," ",self.surname,'how are u?')
Student1=Student(2110075,"Otojon",'Khudayarov',18)
Student1.greet_Student()
'''
'''class Student:
def __init__(self, id_number, name, age):
self.id_number = id_number
self.name = name
self.age = age
def greet_Student(self,gretting):
print("Hello " + self.name + ", how are you?",gretting)
print('ID_number:',self.id_number,gretting)
Student1 = Student(3221, "John Doe", 18)
Student1.greet_Student("this is a value of greetings")
'''
'''class Animal:
def __init__(self, name):
self.name = name
def walk(self):
print(self.name + " walks")
a = Animal("puppy")
a.walk()
'''
'''prices = [10, 38, 40, 58, 62]
halved = []
for price in prices:
half_price = price/2
halved.append(half_price)
print(halved)
'''
# Change this value and test yourself
'''num =int(input('put the number: '))
# ** is used for exponentiation
num_sqrt = num ** 0.5
print('The square root of', num, 'is:', num_sqrt )
'''
# Find the square root of real or complex numbers
# Import the complex math module
'''import cmath
num = 64
num_sqrt = cmath.sqrt(num)
print('The square root of', num, 'is', num_sqrt)
'''
'''class Animal:
def __init__(self,name):
self.name=name
def walk(self):
print(self.name,"walk's",'and',"bark's",'died recently')
x=Animal("bo'ynoq")
x.walk()
class Dog(Animal):
def __init__(self,name,age):
super().__init__(name, age)
def sound(self):
print(self.name,'barks')
d=Dog("bo'ynoq",19)
d.walk()
d.sound()
'''
'''class Animal:
def __init__(self, name, age):
self.name = name
self.age = age
def walk(self):
print(self.name + " walks")
class Dog(Animal):
def __init__(self, name, age):
super().__init__(name, age)
def sound(self):
print(self.name + " barks")
d = Dog("puppy", 1)
d.walk()
d.sound()
'''
'''a="?"
print(ord(a))
'''
#Teacher='Elhadary'
#print(Teacher)
'''def my_func():
global Teacher
Teacher = 'Elhadary'
print(Teacher)
my_func()
print(Teacher)
'''
'''a=int(input("Sonni kiriting: "))
print(a**2)
'''
'''x="I was love {} so much"
txt=x.format('Nilufar')
print(txt)
'''
'''love="you was {0} Nilufar so much {2} {3} {1}"
brokenlove=love.format("loved",'suymaganga suykalma,ok?','but','then')
print(brokenlove)
print('i know myself more than everyone')
'''
'''x='The color of {fruit} is {color}'
fruitcolor=x.format(fruit='orange',color='orange')
print(fruitcolor+' lol lol lmao')
'''
#print(a)
'''x=str(input('dsufgiugfiudjgvbj: '))
y=str(input('secondf: '))
print(x+y)
'''
'''try:
txt = 'bye world'
print(txt)
except:
print('unchalik tushunmadim')
else:
print('full of work')
'''
'''try:
print(a)
except:
print("An error occurred.")
else:
print("No exception was thrown!")
finally:
print("i'm still there")
# codes after the try...except
# will still be executed
txt = "Hello World!"
print(txt)
'''
# no exception thrown here
'''try:
a = "Hello World!"
print(a)
except:
print("An error occurred.")
finally:
print("Hello, I am still printed.")
print("---------------------")
# an exception will be thrown here
try:
print(b)
except:
print("An error occurred.")
finally:
print("Hello, I am still printed.")
'''
'''num = 10
if num > 5:
raise Exception("num is more than 5")
'''
#scratchekan??????pastdagi?????
'''def method_with_unused_parameter(used, redundant):
print("It is used parameter: " + str(used))
def intention_example(a, b):
if not (a and b):
return 1
return 2
method_with_unused_parameter("first", "second")
method_with_unused_parameter("used", "unused")
intention_example(True, False)
'''
'''animals=['fil','it','qoplon','qwerty']
iter_animals=iter(animals)
print(next(iter_animals))
print(next(iter_animals))
print(next(iter_animals))
print(next(iter_animals))
#print(next(iter_animals))
'''
'''age=input('Yoshingizni yozing: ')
print(age)
'''
'''import my_first_module
print(my_first_module.first_name,my_first_module.last_name)
print(my_first_module.qoshish(5,6),'va', my_first_module.kopaytirish(89,5))
print(my_first_module)
'''
'''import my_first_module as my
print(my.first_name,my.last_name)
print(my.kopaytirish(876857**2,78598374598))
'''
'''a=876857**2
b=78598374598
print(a*b)
'''
'''import my_first_module as my
from my import first_name
print(first_name)
'''
'''import my_first_module
x=dir(my_first_module)
print(x)
'''
'''first_name='Otojon'
last_name='Khudayarov'
def kopaytirish(x,y):
return x*y
def qoshish(x,y):
return x+y
print(kopaytirish(4,6)+qoshish(5345,64))
'''
'''import sysconfig
x=sysconfig.get_path_names()
y=sysconfig.get_python_version()
z=sysconfig.get_platform()
a=sysconfig.get_config_vars()
b=sysconfig.get_scheme_names()
c=sysconfig.get_makefile_filename()
d= (sysconfig)
print(x)
print(y)
print(z)
print(a)
print(b)
print(c)
print(d)
'''
#This is where the ADVENTURE begins)))
#import math
'''x=math.sqrt(2846**10)
print(x)
x2=math.pi
print(x2)
x3=math.pow(2,4)
print(x3)
x4=math.ceil(2.7)
x5=math.floor(2.7)
print(x4,x5)
x6=math.inf
x7=math.e
print(x6,x7)'''
'''x8=math.sin(232)
x9=abs(-5)
x10=min(1,2,3,4,4,5)
x11=max(21,123,341,342,34245)
print(x8,x9,x10,x11)
'''
'''import random
x=random.random()
print(x)
y=random.randint(1,1000)
print(y)
'''
'''import datetime
x=datetime.datetime.now()
print(now)'''
'''import datetime
now = datetime.datetime.now()
print(now)
'''
'''import datetime
x=datetime.datetime.now()
print(x)
'''
'''import datetime
x=datetime.datetime(2003,12,13,12,34,34,34)
print(x)
y=datetime.datetime.today()
print(y.strftime('%B,%d,%Y,%j,'
'%c'))
'''
'''import json
x='{"first name":"Otojon","last name":"Khudayarov","Age":18}'
my_json=json.load(x)
a=my_json["first name"]
b=my_json["last name"]
c=my_json["Age"]
print(a,"----------------",b,"----------------",c)
'''
'''import json
x = '{"first_name": "Otojon", "last_name": "Khudayarov", "Age": 18}'
my_json = json.dumps(x,indent=56)
# access its values just like in a dictionary
#a = my_json["first_name"]
#b = my_json["last_name"]
#c = my_json["Age"]
#print("First name: ", a)
#print("Last name: ", b)
#print("Age: ", c)
print(my_json)
'''
'''import re
regex='bye'
txt='otojon hey bye world!'
res=re.search(regex,txt)
print("Index of the start and end position: ", res.span())
print("Index of the start position: ", res.start())
print("Index of the end position: ", res.end())
'''
#print(res)
'''import re
regex = "Python"
txt = "I love Python, because Python is fun to learn!"
matches = re.findall(regex, txt)
print(matches)
'''
'''import re
regex = "Python"
txt = "I love Python, because Python is fun to learn!"
matches = re.findall(regex, txt)
print(matches)
'''
'''import re
regex="Otojon"
txt='Student of New Uzbekistan universityOtojonnKhudayarov '
res=re.findall(regex,txt)
print(res)
'''
'''import re
txt='Otojon is very talented boy and his name is Otojon'
print(re.sub('Otojon','oybek',txt))
'''
'''import re
name='Otojon$'
surname="Xudayarov Otojon"
a=re.findall(name,surname)
if a:
print(a)
else:
print("i don't know bro")
'''
'''import re
x = re.findall("[pmt]", "python")
print(x)
'''
'''import re
name=re.findall('\D',"Otojon is 19 years old while jane is 18")
print(name)
'''
'''import re
x = re.findall("\d", "John is 30 years old, while Jane is 29.")
print(x)
'''
#open()
#import copy
'''file=open('','r')
x=file.read()
print(x)
'''
'''f=open("open_notes","x")
print(f)
'''
'''file=open('open_notes','r')
x=file.read()
print(x)
'''
'''file=open('demo.txt','w')
file.write("it's an addition")
file.close()
#x=file.read()
#print(x)
#f=file.read('demo.txt')
print(file)
'''
'''x=open("otojon.txt",'x')
print(x)
'''
'''import os
os.rmdir('New folder')
'''
'''import os
file_path="open notes"
if os.path.exists(file_path):
print(os.read('open_notes.txt'))
else:
print('qwert')
'''
'''import numpy as numbers
array=numbers.array([1,2,3,4])
x=type(array)
print(array)
print(x)
'''
'''import numpy as np
arr=np.array([1,2,3,4,5])
arr2=np.array(['qw','er','ty','ui'])
print(str(arr)+str(arr2))
'''
'''import numpy as np
# all elements are numbers
x = np.array([1, 2, 3])
# all elements are strings
y = np.array(["dog", "cat", "rabbit"])
print(x)
#print([1 2 3])
'''
'''import numpy
pets=numpy.array(['duck','dog','cow','cat','mouse'])
print(pets[0])
print(pets[1]+' '+pets[2])
'''
'''import numpy
arr=[1,2,3,4,5,6]
print(arr[-4:-1])
print(arr.dtype)
'''
'''import numpy as num
x = num.array([1,2,3,4,5,6,7])
for hello in x:
print("my favourit numbers",hello)
'''
'''import numpy as np
arr=np.array([1,2,3,4,5,6])
for y in np.nditer(arr):
print('heyy',y)
'''
'''import numpy as no
arr=no.array([1,2,3,4,5,6,7,8,9])
arr2=no.array(['otojon','oybek','muhiddin',"jo'raqul"])
#for arr2 in arr:
# print(arr,arr2)
y=no.concatenate((arr,arr2))
print(y)
'''
'''import numpy as qwerty
a=qwerty.array([1,2,3])
b=qwerty.array([4,'hey',6])
c=qwerty.array([7,8,9])
d=qwerty.concatenate((a,c,b))
e=qwerty.where(b=='hey')
print(d)
print(e)
'''
'''import numpy as np
nums=np.array([1,2,3,4,5,6,7,8,9,10,11,12,131,41])
odd=np.where(nums%2==0)
even=np.where(nums%2==1)
people=np.array(['otojon','xudayrov','qwerty','gfghdfgdfgfufjg'])
print('even: ')
for x in even:
print(nums[x])
print('odd: ')
for y in odd:
print(nums[y])
print(np.sort(people))
print(np.sort_complex(nums))
'''
#PYTHON TUTORIALS APP ENDED HOOYAH!!!!
'''import subprocess
a = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors="ignore").split('\n')
a = [i.split(":")[1][1:-1] for i in a if "All User Profile" in i]
for i in a:
try:
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8', errors="ignore").split('\n')
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
try:
print ("{:<30}| {:<}".format(i, results[0]))
except IndexError:
print ("{:<30}| {:<}".format(i, ""))
except subprocess.CalledProcessError:
print ("{:<30}| {:<}".format(i, "ENCODING ERROR"))
a = input("")
'''
'''prices=[1,2,3,4,5,6]
halved=[]
for narx in prices:
half_price=narx/2
halved.append(half_price)
print(halved)
'''
'''price=[1.2,3,4,5,6,7,8,9]
half=[narx**6 for narx in price]
print(half)
halved=[]
for prices in price:
halfprice=prices/2
halved.append(halfprice)
print(halved)
'''
'''flights=['1122','5533','6746574635']
codes_a=['BA'+flight for flight in flights]
print(codes_a)
codes_b=[]
for flight in flights:
code='BA'+flight
codes_b.append(code)
print(codes_b)
'''
'''answers=[True,True,False,False]
opposite=[]
for answer in answers:
opposite.append(not answer)
print(opposite)
print([not answer for answer in answers])
'''
'''expire_years=[2000,2012,2052,2893]
renewed=[years+4 for years in expire_years]
print(renewed)
'''
'''
ages=[13,18,19,12]
can_drive=[18>=age for age in ages]
print(can_drive)
'''
'''names=['otojon','oybek','nigora']
prefixed=['Mr. '+name for name in names]
print(prefixed)
'''
'''words=['apple','banana','abracadabra','kufsuf']
count=[word.count('a') for word in words]
print(count)
'''
'''prices=[1,2,
3,4,5,6,7,8,88,75,54]
def yarim(num):
no_tax=0.85*num
return no_tax/2
halved=[yarim(price) for price in prices]
print(halved)
'''
'''prices=[1,2,3,4,5,6,7,8,9]
def halve(num):
return num/2
halved=[halve(price) for price in prices]
print(halved)
'''
'''def get_full_name():
name=get_full_name.append('otojon')
print(get_full_name())
'''
'''authors=['Otojon Xudayarov','Simon Sinek']
def add_comma(name):
parts=name.split(' ')
return parts[1]+' ,'+parts[0]
author_update=[add_comma(name) for name in authors]
print(author_update)
'''
'''name="otojon xudayarov"
print(name.split())
'''
'''authors=["otojon xudayarov","eshmatjon toshmatov"]
def add_comma(name):
parts=name.split()
return parts[1]+' ,'+parts[0]
updated_author=[add_comma(name) for name in authors]
print(updated_author)
'''
'''words=['otojon','xudayarov','aa','ab']
def has_double_a(word):
couunt=word.count('a')
return couunt==2
double_a=[has_double_a(word) for word in words]
'''
#print(double_a)
'''scores=[12,13,1,345]
def passed(score):
with_bonus=score+10
return with_bonus>90
passing_scores=[passed(score) for score in scores]
print(passing_scores)
'''
'''score=[12,32,4543,57]
def passing(scores):
with_bonus=scores+10
passed=with_bonus>90
return passed
NEW_scoore=[passing(scores) for scores in score]
print(NEW_scoore)
'''
'''scores=[12,13,14,35,465,4,76,8,768,7,989,8,90,98,0,78,8,656,34,4,3,5676,8,799,76,76,45,7]
high_scores=[score for score in scores if score>70]
print(high_scores)
'''
'''name=['otojon','abdullo','shermat','bb','aa']
words2=[word for word in name if word.count('a')==2]
print(words2)
'''
'''user=['joe','paris',57]
name=user[0]
age=[-1]
message=f'{name} {age}'
print(message)
'''
'''letters={1,2,3}
del letters
print(letters)
#0123 123 123 123 123
num=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
print(num[1:9:3])
print(num[::3])
print(num[3::7])
print(num[:1:-7])
'''
'''N=[[1,2,3],[4,5,6]]
print(N)
print(N[1][2])
'''
'''listofstudents=[['otojon','khudayarov','f3',2110075]],[['otabek','oybekov','f3',1234567]]
col2=[row[0] for row in listofstudents]
print(col2)
'''
'''school1={'name':'1school','rating':'3/5','location':'uzb','nstudents':3763}
school1['name']='bobur'
print(school1['name'])
print(school1['location'])
print(school1['name'])
school2={}
school2['name']='oybek'
school2['rating']=5
school2['location']="bog'ot"
print(school2)
print(school2.get('name ','there is no key'))
if 'name' in school2.keys():
print('hey')
else:
print('qwertty')
del school2['name']
print(school2)
'''
#example=('a',12,13,14,"srting")
#print(example)
'''nest=('otojon',('ne wuzb','student'))
print(nest[1][1])
'''
'''t=tuple("students")
print(t)
print(len(t))
'''
'''age=int(input())
if age<=4:
print('admission cost is free')
elif age<18:
print('admsioon costis 28979 sum')
elif age=6:
print('you can tekae discount 400 sum')
else:
print('hey cost is 46938 sum')
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment