KTurtle/C3/Special-Commands-in-KTurtle/Gujarati
From Script | Spoken-Tutorial
Time | Narration |
---|---|
00:01 | KTurtle માં વિશેષ કમાન્ડો પરના આ ટ્યુટોરીયલમાં તમારું સ્વાગત છે. |
00:08 | આ ટ્યુટોરીયલ માં, આપણે આ વિષે શીખીશું
|
00:15 | આ ટ્યુટોરીયલ રેકોર્ડ કરવા માટે હું ઉબુન્ટુ લીનક્સ OS આવૃત્તિ 12.04 અને KTurtle આવૃત્તિ. 0.8.1 બીટાનો ઉપયોગ કરી રહ્યી છું છે. |
00:28 | હું ધારું છું કે તમને KTurtle સાથે કામ કરવા માટેનું મૂળભૂત જ્ઞાન છે. |
00:33 | જો નહિં, તો સંબંધિત ટ્યુટોરિયલ્સ માટે, અમારી વેબસાઇટ 'http://spoken-tutorial.org' જુઓ. |
00:39 | ચાલો નવી KTurtle એપ્લિકેશન ખોલીએ. |
00:42 | Dash home ઉપર ક્લિક કરો. |
00:44 | સર્ચબારમાં, KTurtle ટાઇપ કરો. |
00:47 | KTurtle આઇકોન ઉપર ક્લિક કરો. |
00:50 | પ્રથમ “learn” કમાન્ડ વિષે જોઈએ |
00:53 | learn વિશેષ કમાન્ડ છે અને તે પોતાના કમાન્ડો બનાવવા માટે વપરાય છે. |
01:01 | 'learn' કમાન્ડ ઇનપુટ લે છે અને અને આઉટપુટ રીટર્ન કરી શકે છે. |
01:05 | ચાલો જોઈએ કે નવો કમાંડ કેવી રીતે બને છે. |
01:10 | સ્પષ્ટ વ્યુ માટે હું પ્રોગ્રામ ટેક્સ્ટ ઝૂમ કરીશ. |
01:14 | ચોરસ દોરવા માટે એડિટરમાં કોડ ટાઇપ કરો: |
01:19 | repeat 4 છગડીયા કૌંશ અંદર
{ forward 10 turnleft 90 } |
01:31 | અહીં નંબર 10 ચોરસની બાજુઓની લંબાઈ સ્પષ્ટ કરે છે. |
01:37 | હવે learn કમાન્ડનો ઉપયોગ કરીને ચોરસ દોરવા માટે સામેલ થયેલા કમાન્ડો શીખીએ. |
01:45 | ચોરસ દોરવા માટેના કમાન્ડોના સમૂહને આપણે square તરીકે નામ આપીશું. |
01:50 | 'learn' કમાન્ડ જે કમાન્ડ શીખવાનો છે તે કમાન્ડના નામ દ્વારા અનુસરવામાં આવે છે. આ કિસ્સામાં તે square છે. |
01:59 | ચાલો નીચેનો કોડ ટાઇપ કરીએ. |
02:02 | learn space square space $x |
02:10 | ચાલો છગડિયો કૌંસ ઉમેરીએ.
|
02:13 | ચાલો બદલીએ, 10 by $x
forward $x turnleft 90 } } |
02:19 | નવો કમાન્ડ જે આપણે નિર્ધારિત કર્યો છે તેને square કહેવામાં આવે છે. |
02:23 | square એક ઇનપુટ પરિમાણ લે છે, $x, ચોરસનું માપ સુયોજિત કરવા માટે. |
02:31 | નોંધ લો કે જયારે તમે આ કોડ રન કરો છો, રે, square કોઈ પણ આઉટપુટ રીટર્ન કરતું નથી. |
02:37 | learn કમાન્ડ અન્ય કમાન્ડ square શીખવા માટે હોય છે જે પછીથી ઉપયોગમાં લેવાશે. |
02:43 | square કમાન્ડ હવે બાકીના કોડમાં સામાન્ય કમાન્ડ તરીકે વાપરી શકાય છે. |
02:51 | ચાલો અહીં થોડી વધુ લીટીઓ ઉમેરું. |
02:54 | ચાલો ટાઇપ કરીએ
go 200,200 square 100 |
03:04 | square 100 કમાન્ડની મદદથી ટર્ટલ 100 પરિમાણનું ચોરસ દોરે છે. |
03:11 | ચાલો હવે કોડ રન કરો. |
03:13 | Turtle કેનવાસ ઉપર ચોરસ દોરે છે. |
03:17 | હવે ચાલો 100 ને 50 દ્વારા બદલીએ. |
03:22 | ચાલો ફરીથી રન કરીએ. |
03:23 | ટર્ટલ પરિમાણ 50 સાથે બીજુ ચોરસ દોરે છે. |
03:28 | નોંધ લો કે આ કમાન્ડ આ પ્રોગ્રામના સ્કોપ સુધી જ ઉપયોગ કરી શકાય છે. |
03:35 | હું એડિટરમાંથી વર્તમાન કોડ રદ કરીશ. |
03:38 | “clear” કમાન્ડ ટાઇપ કરો અને કેનવાસ સાફ કરવા માટે Run કરો. |
03:44 | આગામી આપણે "રેન્ડમ" કમાન્ડ વિશે જાણીશું. |
03:48 | random કમાન્ડ ઇનપુટ લે છે અને રીટર્ન આઉટપુટ આપે છે. |
03:52 | રેન્ડમ કમાન્ડ માટે સિન્ટેક્સ “random X,Y” છે |
03:57 | X અને Y બે ઇનપુટ્સ છે. |
04:01 | X ન્યુનત્તમ આઉટપુટ સુયોજિત કરે છે અને Y મહત્તમ આઉટપુટ સુયોજિત કરે છે. |
04:07 | આઉટપુટ X અને વાય વચ્ચે રેન્ડમલી પસંદ થયેલ નંબર છે |
04:13 | ચાલો એપ્લિકેશનમાં ઉપયોગ કરવા માટે “random” કમાન્ડ મુકીએ. |
04:18 | મેં એડિટરમાં પહેલેથી જ કોડ કરેલ છે. |
04:22 | હું કોડ સમજાવીશ. |
04:24 | “reset” કમાન્ડ ટર્ટલને તેની મૂળભૂત સ્થિતિમાં સુયોજિત કરે છે. |
04:29 | અહીં, random 1,20 કમાન્ડ એક રેન્ડમ નમ્બર પસંદ કરે છે જે 1 થી સમાન અથવા વધુ અને 20 કરતાં સમાન અથવા ઓછી હોય છે,અને વેરિયેબલ x માં અસાઇન કરે છે. |
04:44 | repeat કમાન્ડ અને છગડીયા કૌંશ સાથે શરુ થનાર કમાન્ડો એક વર્તુળ દોરે છે. |
04:51 | હું ટેક્સ્ટ એડિટરમાંથી કોડ કૉપિ કરીશ અને KTurtle એડિટરમાં પેસ્ટ કરીશ. |
04:58 | ટ્યુટોરીયલ અટકાવો અને KTurtle એડિટર માં પ્રોગ્રામ પેસ્ટ કરો. |
05:03 | પ્રોગ્રામ ટાઇપ કરીને પછી ટ્યુટોરીયલ ફરી શરૂ કરો |
05:08 | જયારે આપણે આ કોડ રન કરીએ છીએ ત્યારે, |
05:10 | ટર્ટલ કેનવાસ પર 1 અને 20 ત્રિજ્યા સાથે એક વર્તુળ દોરે છે. |
05:16 | ચાલો આ કોડ અમુક વખત રન કરીએ, |
05:20 | તમે જોશો કે અલગ કદ સાથે એક વર્તુળ દરેક સમયે બને છે, |
05:26 | દરેક સમયે તમે આ કોડ રન કરો છો, અલગ ત્રિજ્યા સાથે એક વર્તુળ કેનવાસ પર દોરાય છે. |
05:33 | ચાલો હવે ઉદાહરણમાં learn અને random બંને કમાન્ડો વાપરીએ. |
05:39 | I will clear the current code from the editor type clear command and Run to clean the canvas. |
05:48 | I already have a program in the Text editor. |
05:52 | I will explain the code now. |
05:55 | “reset” command sets Turtle to its default position. |
06:00 | canvassize 300,300 sets the width and height of the canvas to 300 pixels each. |
06:09 | $R, $G, and $B are three variables to which I am assigning random values between 0 and 255. |
06:19 | In the command canvascolor $R,$G, and $B , |
06:23 | the Red-Green-Blue combination is replaced by the values assigned to the variables R, G, and B in the previous step. |
06:34 | The canvas color is randomly set when this command is executed. |
06:41 | $red, $blue, $green are another set of variables |
06:45 | to which random values between 0 and 255 are assigned randomly. |
06:53 | pencolor $red, $blue and $green the Red-Blue -Green combination values are replaced by the variables |
07:02 | $red, $green and $blue to which random values were assigned
in the previous step. |
07:10 | The color of the pen is also set randomly when the command is executed. |
07:18 | penwidth 2 sets the width of pen to 2 pixels. |
07:25 | Next I have entered the code to learn to draw a circle. |
07:30 | Here $x represents the size of the circle. |
07:35 | repeat command followed by the code in curly brackets draws a circle. |
07:43 | The next set of commands that is go commands followed by circle commands draw circles with the specified sizes. |
07:54 | For example: circle with size 5 draws a circle with size 5 |
08:01 | At the co-ordinates specified at X and Y positions in the go command. |
08:09 | For each circle, I have specified different positions on the canvas. |
08:16 | I will copy the code from text editor and paste it into KTurtle's editor. |
08:23 | Pause the tutorial here and type the program into your KTurtle editor. |
08:29 | Resume the tutorial after typing the program. |
08:33 | I will execute this code in Fullspeed. |
08:37 | You can execute this code at any of the speeds specified in the Run option. |
08:43 | I will run this code a few times. |
08:46 | You can see the difference in randomly set values of pen color and canvas color. |
08:54 | Note the change in the color of the pen and the canvas on each execution. |
09:01 | You can execute the code how many ever times you want and note the changes in
the randomly set values of the pen and canvas. |
09:15 | With this we come to the end of this tutorial. |
09:20 | Let's summarize |
09:22 | In this tutorial we have learnt about,
|
09:30 | As an assignment for you to solve, |
09:32 | Using learn command, draw a
|
09:39 | hexagon on all four corners of your canvas and |
09:45 | A circle at the centre of the canvas. |
09:49 | Using the “random” command create various colors and |
09:55 | Customize your geometric shapes and canvas. |
10:00 | Watch the video available at this URL http://spoken-tutorial.org/What is a Spoken Tutorial |
10:04 | It summarises the Spoken Tutorial project |
10:08 | If you do not have good bandwidth, you can download and watch it |
10:13 | The Spoken Tutorial Project Team : |
10:15 | Conducts workshops using spoken tutorials |
10:19 | Gives certificates to those who pass an online test |
10:22 | For more details, please write to contact@spoken-tutorial.org |
10:29 | Spoken Tutorial Project is a part of the Talk to a Teacher project |
10:33 | It is supported by the National Mission on Education through ICT, MHRD, Government of India |
10:40 | More information on this Mission is available at this link http://spoken-tutorial.org/NMEICT-Intro ] |
10:46 | This script is contributed by IT for change, Bangaluru. |
10:50 | This is Madhuri Ganpathi from IIT Bombay signing off. Thank you for joining. |