Introduction to Programming

Introduction to Programming

The Basic model of Computation can be considered as a program executed step by step following with the instructions given by the user to solve a problem or program at end. We formally give a set instruction for a program to be executed and it made executed the program within a certain procedure. Consider a real time event or program i.e. cooking tea where you need all the prerequisites for making that possible like Tea leaves, sugar, milk or water; after boiling the tea leaves in the water or milk along with certain amount of sugar you can have tea to be served in the same way you need all the necessary things for a program like variable to store value, operators to perform operation following with instructions you can be able to solve a problem at end.

कम्प्यूटेशन के बेसिक मॉडल को एक समस्या या प्रोग्राम को हल करने के लिए यूजर द्वारा दिए गए निर्देशों के साथ स्टेप बाई स्टेप निष्पादित प्रोग्राम माना जा सकता है। हम औपचारिक रूप से एक प्रोग्राम को निष्पादित करने के लिए एक सेट निर्देश देते हैं और यह एक निश्चित प्रक्रिया के भीतर प्रोग्राम को निष्पादित करता है। एक वास्तविक समय की घटना या प्रोग्राम पर विचार करें यानी चाय को पकाने जिसमें आपको चाय की पत्ती, चीनी, दूध या पानी जैसे संभव बनाने के लिए सभी आवश्यक शर्ते हों, चीनी या कुछ निश्चित मात्रा में चीनी के साथ पानी या दूध में चाय की पत्तियों को उबालने के बाद आपको उसी तरह से चाय परोसी जा सकती है, जब आपको प्रोग्राम के लिए सभी आवश्यक चीजों की आवश्यकता होती है जैसे कि वैरिएबल को स्टोर करने के लिए, ऑपरेटर्स आपके निर्देशों के अनुसार ऑपरेशन करने के लिए। अंत में एक समस्या को हल करने में सक्षम हो सकता है।

We consider the following things while or before computing a program…

प्रोग्राम की गणना करते समय या उससे पहले हम निम्नलिखित बातों पर विचार करते हैं …

Make sure the output of the program then defines the prerequisites for that program

सुनिश्चित करें कि प्रोग्राम का आउटपुट तब उस प्रोग्राम के लिए आवश्यक शर्ते निर्धारित करता है

Declare the variables for that program and import necessary resources

उस कार्यक्रम के लिए वैरिएबल घोषित करें और आवश्यक संसाधनों को इंपोट करें

Form proper syntax of the program as per the procedure

प्रोसीजर के अनुसार प्रोग्राम का उचित सिंटैक्स

Use necessary functions and methods to get the desired result at end.

वांछित परिणाम प्राप्त करने के लिए आवश्यक कार्यों और विधियों का उपयोग करें।

Algorithms – एल्गोरिदम

An algorithm is a sequence of well-defined instructions for completing a task or solving a problem. It can be described in a natural language, pseudo code, a flowchart or even a programming language. It is independent to be constructed and not depending upon any programming languages. For example, suppose we are interested in knowing whether a specific number is contained in a given sequence of numbers. By traversing the entire number sequence from a certain beginning number to a certain ending number, we use a search algorithm to find that specific number.

एक एल्गोरिदम एक कार्य को पूरा करने या किसी समस्या को हल करने के लिए अच्छी तरह से परिभाषित निर्देशों का एक अनुक्रम है। यह एक नैचुरल भाषा, आभासी कोड, एक फ्लोचार्ट या यहां तक कि एक प्रोग्रामिंग भाषा में वर्णित किया जा सकता है। यह बनने के लिए स्वतंत्र है और किसी प्रोग्रामिंग भाषाओं पर निर्भर नहीं है। उदाहरण के लिए, मान लें कि हम यह जानने में रुचि रखते हैं कि क्या संख्याओं के दिए गए अनुक्रम में एक विशिष्ट संख्या निहित है। एक निश्चित शुरुआत संख्या से एक निश्चित समाप्ति संख्या तक पूरे संख्या अनुक्रम को ट्रेस करके, हम उस विशिष्ट संख्या को खोजने के लिए एक सर्च एल्गोरिदम का उपयोग करते हैं।

What is an Algorithm? – एक एल्गोरिदम क्या है?

An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. An algorithm is thus a sequence of computational steps that transform the input into the output. We can also view an algorithm as a tool for solving a well-specified computational problem. The statement of the problem specifies in general terms the desired input/output relationship. The algorithm describes a specific computational procedure for achieving that input/output relationship.

एल्गोरिदम कोई भी अच्छी तरह से परिभाषित कम्प्यूटेशनल प्रक्रिया है जो इनपुट के रूप में कुछ वैल्यू, या वैल्यू के सेट को लेती है और आउटपुट के रूप में कुछ वैल्यू, या वैल्यू के सेट का उत्पादन करती है। एक एल्गोरिदम इस प्रकार कम्प्यूटेशनल चरणों का एक क्रम है जो इनपुट को आउटपुट में बदल देता है। हम एक एल्गोरिदम को एक अच्छी तरह से निर्दिष्ट कम्प्यूटेशनल समस्या को हल करने के लिए एक उपकरण के रूप में भी देख सकते हैं। समस्या का विवरण सामान्य शब्दों में वांछित इनपुट/आउटपुट संबंध को निर्दिष्ट करता है। एल्गोरिदम उस इनपुट/आउटपुट संबंध को प्राप्त करने के लिए एक विशिष्ट कम्प्यूटेशनल प्रक्रिया का वर्णन करता है।

Characteristics of Algorithm – एल्गोरिदम की विशेषतायें

An Algorithm is as important as program code because writing the program code directly without making an algorithm makes usually unsure to fulfill the program objective and feel uncomfortable as well as lacking of idea that how to do and design.

एल्गोरिदम प्रोग्राम कोड जितना ही महत्वपूर्ण है क्योंकि एल्गोरिदम बनाए बिना प्रोग्राम कोड को सीधे लिखना आमतौर पर प्रोग्राम के उद्देश्य को पूरा करने के लिए अनिश्चित बनाता है और असहजता के साथ-साथ विचार की कमी महसूस करता है कि कैसे करें और डिजाइन करें।

Characteristics of Algorithm are given below…

एलगोरिदम की विशेषताएँ नीचे दी गई हैं ……

It is general English language written in steps to justify the program objective which can easily be understood by a beginner.

यह सामान्य अंग्रेजी भाषा है जिसे प्रोग्राम के उद्देश्य को सही ठहराने के लिए चरणों में लिखा गया है जिसे आसानी से एक शुरुआतकर्ता द्वारा समझा जा सकता है।

It is no more program code what creates the complexity to read and write the program any more.

यह और कोई प्रोग्राम कोड नहीं है जो प्रोग्राम को किसी भी अधिक रीड और राईट के लिए जटिलता पैदा करताहै।

Program control is always.in From Top-to-Bottom approach unless any diversion of steps is executed.

प्रोग्राम नियंत्रण हमेशा ऊपर से नीचे के दृष्टिकोण से होता है जब तक कि किसी भी कदम को मोड़ नहीं दिया जाता है।

It is independent of Programming languages; no more depending upon a programming language hence can be used and designed for a program of any programming language.

यह प्रोग्रामिंग भाषाओं से स्वतंत्र है, कोई प्रोग्रामिंग भाषा पर निर्भर नहीं करता है और इसलिए किसी भी प्रोग्रामिंग भाषा के एक कार्यक्रम के लिए इस्तेमाल और डिजाईन किया जा सकता है।

Chapter wise Model Paper Link