Научная статья на тему 'METHODOLOGY OF USING FUNCTIONS IN TEACHING THE PYTHON PROGRAMMING LANGUAGE'

METHODOLOGY OF USING FUNCTIONS IN TEACHING THE PYTHON PROGRAMMING LANGUAGE Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
0
0
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
program educational methods programming environment functions procedure component application database information information environment electronic machines / program educational methods programming environment functions procedure component application database information information environment electronic machines

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Hasanov Behzod Normurot O‘G‘Li

At a time when modern information technologies are widely developed, it is one of the urgent issues to approach teaching programming languages to students of general education schools with a special method, to develop simplified methods, and to assign tasks to students taking into account their age. Students in general secondary schools are encouraged to develop independent programming skills, interest in programming languages, and motivate them to find their place in the future and create excellent programs for the development of the country. Nowadays, when modern information technologies are widely developed, one of the most actual problems is to issue a special approach for teaching programming languages to secondary school students and to pay attention to the development of simplified methods, assigning tasks based on the age of students. This article develops self-programming skills among high school students, helps to develop an interest in programming and helps them find their place in the future, as well as create better programs for the development of the country.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

METHODOLOGY OF USING FUNCTIONS IN TEACHING THE PYTHON PROGRAMMING LANGUAGE

At a time when modern information technologies are widely developed, it is one of the urgent issues to approach teaching programming languages to students of general education schools with a special method, to develop simplified methods, and to assign tasks to students taking into account their age. Students in general secondary schools are encouraged to develop independent programming skills, interest in programming languages, and motivate them to find their place in the future and create excellent programs for the development of the country. Nowadays, when modern information technologies are widely developed, one of the most actual problems is to issue a special approach for teaching programming languages to secondary school students and to pay attention to the development of simplified methods, assigning tasks based on the age of students. This article develops self-programming skills among high school students, helps to develop an interest in programming and helps them find their place in the future, as well as create better programs for the development of the country.

Текст научной работы на тему «METHODOLOGY OF USING FUNCTIONS IN TEACHING THE PYTHON PROGRAMMING LANGUAGE»

METHODOLOGY OF USING FUNCTIONS IN TEACHING THE PYTHON PROGRAMMING LANGUAGE Hasanov Behzod Normurot o'g'li

Bukhara State Pedagogical Institute

Major "Manimatics and Informatics", 3rd grade student

e-mail: hasanovbehzod5@gmail.com

https://doi.org/10.5281/zenodo.11256218

ARTICLE INFO

ABSTRACT

Qabul qilindi: 11-mart 2024 yil Ma'qullandi: 15-mart 2024 yil Nashr qilindi: 18-mart 2024 yil

KEYWORDS program, educational methods,

programming

functions,

component,

database,

information,

environment, procedure, application, information, environment,

electronic machines.

At a time when modern information technologies are widely developed, it is one of the urgent issues to approach teaching programming languages to students of general education schools with a special method, to develop simplified methods, and to assign tasks to students taking into account their age. Students in general secondary schools are encouraged to develop independent programming skills, interest in programming languages, and motivate them to find their place in the future and create excellent programs for the development of the country. Nowadays when modern information technologies are widely developed, one of the most actual problems is to issue a special approach for teaching programming languages to secondary school students and to pay attention to the development of simplified methods assigning tasks based on the age of students. This article develops self-programming skills among high school students, helps to develop an interest in programming and help them find their place in the future, as well as create better programs for the development of the country.

INTRODUCTION.

Experiences show that niy achieve niir goals in life only when niy reach ni end of ni work niy have started, patiently and independently. Ni student plays a special role in ni traditional education of students by organizing independent work. Due to ni extremely large flow of information and ni development of science and technology, no matter how skilled ni student is, no matter how much knowledge niy have in ni course of ni lesson, students cannot convey knowledge. Ni only way to fill it is for students to work on it independently. From this point of view, ni role of independent work of students in ni teaching process given to us is ni subject of special attention to independent education.

LITERATURE ANALYSIS.

Ni article [3] provides information on ni use of datasets and types and technologies in ni Python programming language in computer science classes.

[4] in ni article, ni method of using functions in teaching ni Python programming language in ni study of academic subjects and ni approach to ni history of science to a certain extent brings ni educational process closer to scientific knowledge, and while getting acquainted with ni teacher's concepts of informatics, in ni course of ni lesson, niir history and talking about its development (mainly ni services of our great ancestors) increased students' interest in science.

Ni article [5] analyzed ni issue of using didactic games in ni process of teaching manimatics. It was noted that ni level of organization of lessons depends on ni teacher's creativity. It is said that ni students will consolidate ni knowledge niy have received from ni lesson and prepare to apply it in life.

[6] in ni article, it is noted that ni role of independent education in strengnining students' knowledge in today's adandnced science and technology era is of particular importance. From this point of view, it is emphasized that it is very important to increase students' self-confidence, learn independently, study independently, and teach nim to work independently. In addition, ni aspects that should be paid attention to in ni organization of independent education of students, ni instructions that should be given to students were briefly discussed.

Ni article [7] provides a brief understanding of labor-related issues and how niy are divided into types, stages of solving nim, and ni main laws encountered in such issues. Summarizing ni considerations about what assertions we should pay attention to when solving textual arithmetical problems related to work, solutions of problems on ni topic are presented as examples. It is noted that ni problems solved with ni given confirmations and comments will help students and independent learners of ni subject to master ni textual problems without difficulties.

Ni article [8] presents a number of nioretical and logical foundations for ni development of students' creative thinking, without which it is emphasized that it is impossible to correctly solve exponential equations and inequalities. Typical andriations of exponential equations and inequalities are given, as well as instructions for solving such problems.

Ni article [9] provides important information on what to pay attention to in order to have basic knowledge in solving inequalities using best practices in ni development of education and to avoid errors in generalizing solutions. Using ni algorithmic method, solutions of examples of inequalities related to fractional-rational, irrational, logarithmic and trigonometric functions are provided.

[10-15] article is devoted to ni analysis of ni effectiveness of interactive technologies as a means of improving ni quality of ni educational process. Today, it is noted that ni use of interactive methods is widely introduced in ni educational process, which requires ni humanization, democratization and liberalization of ni educational process. Interactive methods are aimed at achieving high results in a short period of time without spending a lot of time and physical effort, teaching ni student nioretical knowledge, acquiring skills and competencies in certain types of activities, forming moral qualities, controlling ni student's knowledge and it is said that assessment requires great skill and dexterity

RESULTS

Several programming languages have been developed today, such as Pascal, Delphi, C++, C#, Python, Java, and others. These programming languages are designed to solve problems in a certain direction, and they can be called object-oriented programming languages. Before talking about programming languages, we found it necessary to dwell on the essence of the concepts "program", "programming", "programming environment".

1

A program is a clear and complete expression in a formal (conditional) algorithmic language, taking into account the conditions, purpose and task of the work performed on the basis of pre-prepared algorithm and computing tools [3-7].

A program is a plan of work or an activity. A program is a sequence of actions that must be performed on a computer to solve a problem.

A programming language is a formal language in which programs (sets of instructions) are written for computers, forcing it to perform certain actions.

We believe that programming is the process of creating, testing, and debugging programs for computers and other microprocessor-based electronic machines. In other words, the process of creating a program for a computer is programming, and a person who creates a program is called a programmer. A language that a computer understands is called a programming language.

A programming environment is the language and environment in which the programmer writes the code. For example: Widespread and multi-user environments are examples. PHPStorm is mainly for PHP developers, VisualStudio is for .Net developers, NetBeans is for Java, PHP developers, PHPDesigner is mainly for web (PHP) developers. Nowadays, programming is done using high-level programming languages (Delphi, Java, C++, S#, Python). Because the semantics of these programming languages are close to human language, it facilitates the process of programming.

The following key concepts are important in learning the Python programming language. A function is a part of a program that performs a specific task, has a name, accepts one or more values, and returns one or more result values to the main program after completing the work.

The part program is called when necessary. It can be used multiple times throughout the program, eliminating the need to write the same code multiple times. This increases the blockability of the code, makes it easier to understand, and helps in finding errors. A single block of code can be checked for errors. If the error is in the part of the program, only the part of the program itself needs to be corrected. If the code is written repeatedly in several places without using the part program, then you have to search for errors throughout the program.

• the code needs to be updated in only one place: All the corrections made take effect as soon as the part program is called.

• a procedure is a reusable part of a program similar to a function, except that it does not return any value.

The Python programming language has several useful standard functions designed to solve a variety of problems:

Each function and procedure must be named, and this name begins with the keyword def, derived from the word define in Python. def is the keyword that declares a function. function_name - function name.

parameter list - this list can consist of several parameters and they are separated by commas. command_block - the body of the function must be written with a single letter, like other operators.

When a function is called by name, the sequence of commands it contains is executed. After that, the program returns to the line where the function was called and proceeds to the next commands on that line.

In Python, procedures are written almost like functions. The difference is that procedures do not return any value.

A function calling itself is called recursion, and such functions are called recursive functions. Recursive functions are a powerful programming mechanism, but they are not always efficient. Because in most cases he makes mistakes. The most common error is infinite

recursion. In this case, the function call chain is infinite and continues until the computer runs out of free memory. Reasons why infinite recursion occurs:

- incorrect use of a condition in recursion. For example, if we forget if n==0 when calculating a factorial, the factorial(0) function calls factorial(-1), and the factorial(-1) function calls factorial(-2) and so on;

- calling a recursive function with an incorrect parameter. For example, if the factorial(n) function calls factorial(n), an infinite chain will occur. Therefore, when creating a recursive function, it is necessary to think about the condition for ending the recursion and when and how to end the recursion.

Discussion

Below we will consider programs using functions and procedures in the Python programming language. The condition of our first program is as follows: write a program to find the least common multiple of two given numbers. Use the function [8-15].

def ekuk(a, b): n = a * b

while a != 0 and b != 0: if a > b:

a %= b else: b %= a return n // (a + b) a = int(input('a = ')) b = int(input('b = ')) print('EKUK:', ekuk(a, b))

The condition of our second program is as follows: write a program that expresses the given number n in Roman numerals. Use the function.

a = [(1000, 'M'), (900, 'CM'), (500, 'D'), (400, 'CD'), (100, 'C'), (90, 'XC'),

(50, 'L'), (40, 'XL'), (10, 'X'), (9, 'IX'), (5, 'V'), (4, 'IV'), (1, 'I')] def rim(n): s = ''

while n > 0: for i, r in a: while n >= i: s += r n -= i return s n=int(input("Son kiriting=")) print(rim(n))

The third program condition: write a program that finds the smallest of the four given numbers. To do this, create a function min4(a, b, c, d).

def min(a,b): ifa>b:

return b else:

return a def min4(a,b,c,d):

return min(min(min(a,b),c),d) a=int(input('a=')) b=int(input('b=')) c=int(input('c=')) d=int(input('d='))

print('Eng kichik son=',min4(a,b,c,d)) CONCLUSION

Python is an object-oriented programming language that is easy to understand and easy to learn. The advantages of Python programming language are that first: the program created in this programming language works on other platforms and operating systems; second: code written on one platform or operating system may occupy different memory when ported to another platform or operating system. This may lead to some errors. An example of such programs is the C programming language. And in the Python programming language, such a deficiency has been eliminated; The teaching of modern programming languages in a general high school prepares the ground for students to work in a programming environment and create independent programs, create applications for various sectors of our country, use modern information technology tools, and open new facets in their practical work..

REFERENCES:

1. Тулаганов Т. П.Элементар математика: Арифметика, алгебра: Пед. ин-тлари ва ун-тлар учун укув кулланма. - Т.: Укитувчи, 1997. -272 б

2. Карим Мух,амедов Элементар Математикадан Кулланма олий укув юртига кирувчилар учун "укитувчи" нашриёти тошкент-1976

3. Nozimbek Zaripov, Behzod Hasanov Python dasturlash tilida ma'lumot to'plamlari and turlari Interpretation and researches 2023/5/27 Tom 1. №1 c.

4. Nozimbek Zaripov, Behzod Hasanov Python dasturlash tilini o'qitishda funksiyalardan foydalanish metodikasi Talqin and tadqiqotlar 2023/2/27 Tom 1. №18 c.

5. Zaripov Nozimbek Nayimovich, Hasanov Behzod Normurot o'g'li Python dasturlash tilini o'qitishda funksiyalardan foydalanish metodikasi Talqin and tadqiqotlar ilmiy-uslubiy jurnali 2023 Tom 1. №18 c. 15-19.

6. Zaripov Nozimbek Nayimovich, Hasanov Behzod Normurot o'g'li Options for Working with Files in ni Python Programming Language International Interdisciplinary Research Journal Volume 2 Issue 3, Year 2023 ISSN: 2835-3013 c. 371-375.

7. Hasanov Behzod Normurot o'g'li Matritsa ustida amallar bajarish metodlari Educational research in universal sciences, 2024/3/3 c.38-45.

8. Behzod hasanov. Kompyuter tarmoqlari haqida umumiy tushunchalar. Ilm-fan and ta'lim 2024/4/14. 5 (20) c.221-226.

9. Hasanov Behzod Normurot o'g'li Zaripov Nozimbek Nayimovich. Pythonda masalalarni dasturlash and ularni o'qitish metodikasi. Ta'lim tizimida zamonaviy axborot texnologiyalari resurslaridan foydalanish istiqbollari". 2023/5/30.c. 462-464.

10. Hasanov B.N Zaripov N. N. Python dasturlash tilida ma'lumot to'plamlari and turlari. Lm-

fan muammolari tadqiqotchilar talqinida

ilmiy konferensiya ". 2023/5/20.c. 275-277.

11. Zaripov Nozimbek Nayimovich, Hasanov Behzod Normurot O'G'Li. Python dasturlash tilini o 'qitishda funksiyalardan foydalanish metodikasi. Talqin and tadqiqotlar ilmiy-uslubiy jurnali. 2023. Tom 1№1c. 15-19.

12. Hasanov B.N Zaripov N. N.. Python dasturlash tilida foydalanuvchi grafik interfeysi imkoniyatlari. Математик моделлаштириш ва ахборот технологияларининг долзарб масалалари» халцаро илмий-амалий анжуман. 2023/5/2. Tom 3 №3 c. 455-457.

13. Hasanov Behzod normurot o'g'li zaripov nozimbek nayimovich. Umumiy o'rta ta'lim maktablarida dasturlash tillarini o'qitish metodikasi. Boshlang'ich ta'limda xalqaro tajribalar: yangi avlod darsliklari, milliy dastur and raqamli texnologiyalar integratsiyasi. 2023/5/19. C. 791-793.

14. Nozimbek Zaripov, Behzod Hasanov. Scratch dasturlash muhitida tarmoqlanuvchi bloklar bilan ishlash. Евразийский журнал академических исследований. 2023/6/6. Tom 3. №6 c.98-101.

15. Hasanov Behzod Normurot o'g'li Zaripov Nozimbek Nayimovich. Umumiy o'rta ta'lim maktablarida dasturlash tillarini o'qitish metodikasi. Boshlang'ich ta'limda xalqaro tajribalar: yangi avlod darsliklari, milliy dastur and raqamli texnologiyalar integratsiyasi. 2023/5/19. C. 791-793.

i Надоели баннеры? Вы всегда можете отключить рекламу.