Python daturlash maktabi 🐍
Open in Telegram
647
Subscribers
No data24 hours
-17 days
-430 days
Posts Archive
🛸Тошкентда бўлиб ўтган дронлар шоусида нечта учувчисиз қурилма учганини биласизми? Уни қанча мутахассис бошқарди? Дастур яна давом этадими? Шоуга тайёргарлик жараёнлари сизга қизиқми? Саволлар кўп, уларга жавобни репортажимиз орқали билиб олинг.
@uz_python
📹 IT мутахассиси бўлиш қанчалик яхши? Мотивация! →
👤 #Xabar_uz →
@BekorchiStudentlar 📹360p
👨💻👩💻👨💻👩💻👩💻👩💻👨💻👩💻👨💻👩💻👨💻👨💻
https://t.me/joinchat/AAAAAFfjDpj60ozzHmLbKw
📹 PYTHON DASTURLASH TILI HAQIDA! →
👤 #YOUNG_PROGERS →
@uz_python : 📹360p
https://t.me/joinchat/AAAAAE_s-1Y-4RF7zEI09g
Assalomu alaykum qadri va qaddi baland qadrdonlarim! Mana o'zining yaxshi-yu yomon sovg'alarini ulashib oqsoch 2019-yil xayrlashish ostonasiga yetmoqda. Siz-u biz o'tayotgan yilning Alloh tomonidan ko'rsatgan kunlariga shukrona aytgan holda yangi yilni yorug' yuz bilan qarshilaylik.
2020-yil dardi borga davo, qarzi borga imkon, farzand talabga solih farzand, davlat talabga halol davlat, ilm yo'lidagi toliblarga mukammal diniy va dunyoviy bilim, baxti ochilmagan yigit-qizlarga baxtli turmush, keksalarga uzoq umr-u mustahkam iymon , ota-ona, qaynona-qaynota xizmatidagi yoshlarga insof , go'daklarga baxtli bolalik olib kelsin. Yilning har bir daqiqasi ezgu amallarimiz bilan umr sahifalarimizga zarhal harflar bilan yozilsin. Bizni sog'intirayotgan oppoq qor olamni qoplasin-u qalblarimizning qaysidir burchagida qotib qolgan qahraton sovuqligini mehr quyoshi eritib yuborsin. Yil bo'yi mehr-muhabbat quchog'idan chiqa olmaylik.
Yangi yilingiz muborak bo'lsin, azizlar.
➖➖➖➖➖➖➖➖➖➖
🌐 PYTHON Darslari 24-qism
➖➖➖➖➖➖➖➖➖➖
PYTHON dasturini ya'ni .py faylni .exe ga o'zgartirish
➕ Bizga Qoshilish uchun quyidagi ssilkani bosing:
https://t.me/joinchat/AAAAAE_s-1aj8aox1jaYSQ
➖➖➖➖➖➖➖➖➖➖
🌐 PYTHON Darslari 23-qism
➖➖➖➖➖➖➖➖➖➖
PYTHON dasturida Input Funksiya
⏩ Keyingi Darsni o'tkazib yubormang!
➕ Bizga Qoshilish uchun quyidagi ssilkani bosing:
https://t.me/joinchat/AAAAAE_s-1aj8aox1jaYSQ
Python 3.8.0 versiya. Bu eng yangi versiyasi
➕ Bizga Qoshilish uchun quyidagi ssilkani bosing:
https://t.me/joinchat/AAAAAE_s-1aj8aox1jaYSQ
😲Biz foydalanayotgan Telegram messenjeri 1985-yilda yaratilgan inson tiliga yaqin va mukammal bo'lgan C++ dasturlash tilida yozilgan...
👉 @uz_python 👈
#Dasturlash
Python Dasturlash tili nechanchi yili kim tomonidan yaratilgan ?
Python juda ko'p loyihalarda ishlatilgan.
Veb-dasturlash
▪️Zope — CMS yaratish uchun server va veb dasturlar qilish uchun dastur.
▪️Django — web yaratish qilish uchun dastur.
▪️Turbogears — web yaratish qilish uchun dastur.
▪️CherryPy — web yaratish qilish uchun dastur.
▪️Plone — saytni muhofaza qilish uchun dastur.
▪️Mailman — „Rassilka“ yaratish uchun dastur
▪️MoinMoin — viki — dvijok internet va intranet uchun.
▪️PlanetPlanet — RSS oqimini sindikatsiyalash.
Grafika
▪️Skencil — Vektor grafikasi uchun dastur.
Pythonni ishlatadigan dasturlar
▪️Wikipedia — botlarni yozish uchun ishlatadi.
▪️Civilization IV — Yaxshi strategiya oʻyin.
Pythonni ishlatadigan kompaniyalar
▪️Kosmik teleskop instituti
▪️NASA
▪️Google
▪️DreamWorks
▪️Industrial Light & Magic
▪️Firaxis Games
▪️Apple Computer
▪️CCP
🌐 @uz_python
if((curr->right)->left != NULL)
{
tree_node* lcurr;
tree_node* lcurrp;
lcurrp = curr->right;
lcurr = (curr->right)->left;
while(lcurr->left != NULL)
{
lcurrp = lcurr;
lcurr = lcurr->left;
}
curr->data = lcurr->data;
delete lcurr;
lcurrp->left = NULL;
}
else
{
tree_node* tmp;
tmp = curr->right;
curr->data = tmp->data;
curr->right = tmp->right;
delete tmp;
}
}
return;
}
}
void BinarySearchTree::print_inorder()
{
inorder(root);
}
void BinarySearchTree::inorder(tree_node* p)
{
if(p != NULL)
{
if(p->left) inorder(p->left);
cout<<" "<data<<" ";
if(p->right) inorder(p->right);
}
else return;
}
void BinarySearchTree::print_preorder()
{
preorder(root);
}
void BinarySearchTree::preorder(tree_node* p)
{
if(p != NULL)
{
cout<<" "<data<<" ";
if(p->left) preorder(p->left);
if(p->right) preorder(p->right);
}
else return;
}
void BinarySearchTree::print_postorder()
{
postorder(root);
}
void BinarySearchTree::postorder(tree_node* p)
{
if(p != NULL)
{
if(p->left) postorder(p->left);
if(p->right) postorder(p->right);
cout<<" "<data<<" ";
}
else return;
}
int main()
{
BinarySearchTree b;
int ch,tmp,tmp1;
while(1)
{
cout<>ch;
switch(ch)
{
case 1 : cout<<" Qo'shish uchun son kiriting : ";
cin>>tmp;
b.insert(tmp);
break;
case 2 : cout<>tmp1;
b.remove(tmp1);
break;
case 6 : system("pause");
return 0;
break;
}
}
}
#include <iostream>
#include <cstdlib>
using namespace std;
class BinarySearchTree
{
private:
struct tree_node
{
tree_node* left;
tree_node* right;
int data;
};
tree_node* root;
public:
BinarySearchTree()
{
root = NULL;
}
bool isEmpty() const { return root==NULL; }
void print_inorder();
void inorder(tree_node*);
void print_preorder();
void preorder(tree_node*);
void print_postorder();
void postorder(tree_node*);
void insert(int);
void remove(int);
};
// kichkina elementi chap tarafga joylashtiriladi
// kattaroq elementi o'ng tarafga joylashtiriladi
void BinarySearchTree::insert(int d)
{
tree_node* t = new tree_node;
tree_node* parent;
t->data = d;
t->left = NULL;
t->right = NULL;
parent = NULL;
// bu yangi daraxtmi?
if(isEmpty()) root = t;
else
{
// Izoh: HAMMA qo'shimchalar barg tugunlari kabi
tree_node* curr;
curr = root;
// Find the Node's parent
while(curr)
{
parent = curr;
if(t->data > curr->data) curr = curr->right;
else curr = curr->left;
}
if(t->data < parent->data)
parent->left = t;
else
parent->right = t;
}
}
void BinarySearchTree::remove(int d)
{
// Elementni toping
bool found = false;
if(isEmpty())
{
cout<<" This Tree is empty! "<<endl;
return;
}
tree_node* curr;
tree_node* parent;
curr = root;
while(curr != NULL)
{
if(curr->data == d)
{
found = true;
break;
}
else
{
parent = curr;
if(d>curr->data) curr = curr->right;
else curr = curr->left;
}
}
if(!found)
{
cout<<" Bunday son mavjud emas! "<<endl;
return;
}
/*// 3 ta holat:
// 1. Biz barg tugunini olib tashlaymiz
// 2. Biz bitta bola bilan tugunni olib tashlaymiz
// 3. biz 2 bolali tugunni olib tashlaymiz
// Bitta bolali tugun*/
if((curr->left == NULL && curr->right != NULL)|| (curr->left != NULL
&& curr->right == NULL))
{
if(curr->left == NULL && curr->right != NULL)
{
if(parent->left == curr)
{
parent->left = curr->right;
delete curr;
}
else
{
parent->right = curr->right;
delete curr;
}
}
else // chap bola hozir, o'ng bola yo'q
{
if(parent->left == curr)
{
parent->left = curr->left;
delete curr;
}
else
{
parent->right = curr->left;
delete curr;
}
}
return;
}
//We're looking at a leaf node
if( curr->left == NULL && curr->right == NULL)
{
if(parent->left == curr) parent->left = NULL;
else parent->right = NULL;
delete curr;
return;
}
/* 2 farzandli tugun
// tugmani o'ng pastki satrda eng kichik qiymat bilan almashtirish */
if (curr->left != NULL && curr->right != NULL)
{
tree_node* chkr;
chkr = curr->right;
if((chkr->left == NULL) && (chkr->right == NULL))
{
curr = chkr;
delete chkr;
curr->right = NULL;
}
else // o'ng farzandning bolalari bor
{
/* agar tugunning o'ng bolasida chap bolasi bo'lsa
// Kichkina elementni topish uchun chap tomonga pastga siljiting*/
/*
4-Variant.
Royhat yarating, Royhatga N ta haqiqiy son kiriting. Royhatning minimum elementini ochirich dasturini tuzing.
Dastur Kodi:
*/
#include <iostream>
using namespace std;
class Node{
public:
int number;
Node* next;
};
int main()
{ int n;
cout<<"Ro'yhat Elementlari sonini kiriting: \n\n";
cin>>n;
Node* head = NULL;
Node* lastPtr = NULL;
cout<<"\nRo'yhat Elementlarini kiriting: \n\n";
for(int i=0;i<n;i++){
{
Node* ptr = new Node;
int numb = -1;
cin>>numb;
ptr->number = numb;
ptr->next = NULL;
if (head == 0)
{ head = ptr;
lastPtr = ptr;
continue;
}
lastPtr->next = ptr;
lastPtr = ptr;
continue; } }
{
Node* ptr = NULL;
if (head == 0)
{
cout<<"\t!!! Ro'yhat bosh !!!\n\n";
system("PAUSE");
}
cout<<"\nRo'yhat minimal elementlari o'chirildi!: \n\n";
ptr = head;
int min=ptr->number;
Node* q = new Node;
while(ptr){
if(min>ptr->number){ min=ptr->number;}
ptr=ptr->next; }
ptr = head;
while (1) {
if(min==ptr->number) {
delete(ptr);}
else cout<<ptr->number<<" ";
if (ptr->next == 0) break;
ptr = ptr->next; }
cout<<"\n\n";
system("PAUSE"); } }
/*
Mahsulot nomlaridan tashkil topgan ro’yhat berilgan. Ro’yhat elementlaridagi SONY firmasida ishlab chiqilgan mahsulotlardan tashkil topgan yangi ro’yhat yarating.
Algoritmi:
ContainsWord nomli mantiqiy funksiya yaratish;
Undan faqat true yoki false qiymat qaytaradi.
Ro
yhat yaratish;
Royhatga malumot kiritish;
Sony sozini malumotda qatnashganligini tekshirish;
Sony sozi qatnashgan malumotlarni chiqarish.
*/
Dasturiy korinishi:
#include "iostream"
#include "string"
#include "list"
using namespace std;
bool containsWord(string word, string inLine) {
int wlen, counter = 0, slength = inLine.length() - word.length() + 1;
wlen = word.length();
for(int i = 0; i < slength; i++) {
for(int j = 0; j < word.length(); j++){
if(word[j] == inLine[i + j])
counter++;
else{
counter = 0;
break;
}
}
if(counter == wlen) {
return true;
}
counter = 0;
}
return false;
}
main()
{
list<string> brands;
brands.push_front("Televizor-Artel");
brands.push_front("Changyutgich-Roison");
brands.push_front("Telefon-Sony");
brands.push_front("Notebook-Asus");
brands.push_front("Konditsioner-Sony");
brands.push_front("Playstation-Sony");
brands.push_front("Muzlatgich-Artel");
brands.push_front("Blender-Artel");
brands.push_front("Televizor-Sony");
brands.push_front("Notebook-Acer");
string current, brand = "Sony";
list<string> sonyBrands, bCopy = brands;
for(int i = 0; i < brands.size(); i++) {
current = bCopy.front();
if(containsWord(brand, current)) {
sonyBrands.push_front(bCopy.front());
}
bCopy.pop_front();
}
list<string> copy = sonyBrands;
cout << endl << "Sony brendi ostidagi tovarlar:" << endl << endl;
for(int i = 0; i < sonyBrands.size(); i++) {
cout << copy.front() << endl;
copy.pop_front();
}