<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Programming &#8211; Pythaverse</title>
	<atom:link href="https://pythaverse.space/docs-tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>https://pythaverse.space</link>
	<description></description>
	<lastBuildDate>Fri, 29 Dec 2023 12:19:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.7</generator>

<image>
	<url>https://pythaverse.space/wp-content/uploads/2023/03/cropped-short_fullcolor_logo_square-32x32.png</url>
	<title>Programming &#8211; Pythaverse</title>
	<link>https://pythaverse.space</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">221496171</site>	<item>
		<title>How to use PTutor</title>
		<link>https://pythaverse.space/docs/how-to-use-ptutor/</link>
		
		<dc:creator><![CDATA[Trang Nguyen Ad]]></dc:creator>
		<pubDate>Tue, 12 Dec 2023 08:15:06 +0000</pubDate>
				<guid isPermaLink="false">https://pythaverse.space/?post_type=docs&#038;p=8590</guid>

					<description><![CDATA[A. INTRODUCTION TO PTUTOR PTutor is an AI (Artificial Intelligence) designed to assist students in effortlessly writing code programs and enhancing the efficiency of learning Leanbot programming. PTutor helps Leanbot programming with the following main features: B. HOW TO USE PTUTOR To use PTutor, users need to visit the Leanbot IDE page, then click on [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<h1 class="wp-block-heading">A. INTRODUCTION TO PTUTOR</h1>



<p class="wp-block-paragraph">PTutor is an AI (Artificial Intelligence) designed to assist students in effortlessly writing code programs and enhancing the efficiency of learning Leanbot programming. PTutor helps Leanbot programming with the following main features:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="637" height="466" src="https://pythaverse.space/wp-content/uploads/2023/12/image-4.png" alt="" class="wp-image-8621" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-4.png 637w, https://pythaverse.space/wp-content/uploads/2023/12/image-4-300x219.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-4-600x439.png 600w" sizes="(max-width: 637px) 100vw, 637px" /><figcaption class="wp-element-caption"><em>Features of PTutor</em></figcaption></figure>
</div>


<h1 class="wp-block-heading">B. HOW TO USE PTUTOR</h1>



<p class="wp-block-paragraph">To use PTutor, users need to visit the Leanbot IDE page, then click on PTutor.&nbsp;</p>



<ul class="wp-block-list">
<li>The Leanbot IDE is a tool used for writing programs and compiling code to upload to the Leanbot robot.</li>



<li>With PTutor, users will quickly comprehend the meaning of each command line, code segment, functions used or debug the programming your code programs.</li>
</ul>



<h2 class="wp-block-heading">I. ACCESS LEANBOT IDE TO PROGRAMMING LEANBOT</h2>



<h3 class="wp-block-heading"><a id="post-8590-_Toc152857027"></a>STEP 1. LOG IN TO THE LEANBOT IDE</h3>



<ul class="wp-block-list">
<li>Access Leanbot IDE from your course on PLearn, or directly to link <a href="https://ide.pythaverse.space/">https://ide.pythaverse.space/</a> to write a program for the Leanbot robot.</li>



<li>You need to log in to your Pythaverse account, then click &#8220;<kbd>Login</kbd>&#8221; button (if not logged in):</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" width="609" height="567" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-2.png" alt="" class="wp-image-8593" style="object-fit:cover" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-2.png 609w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-2-300x279.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-2-600x559.png 600w" sizes="(max-width: 609px) 100vw, 609px" /><figcaption class="wp-element-caption"><em>Pythaverse login screen</em></figcaption></figure>
</div>


<ul class="wp-block-list">
<li>Go to the Leanbot IDE page interface after successfully logging in:</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img decoding="async" width="1024" height="501" src="https://pythaverse.space/wp-content/uploads/2023/12/image-5-1024x501.png" alt="" class="wp-image-8622" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-5-1024x501.png 1024w, https://pythaverse.space/wp-content/uploads/2023/12/image-5-300x147.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-5-768x376.png 768w, https://pythaverse.space/wp-content/uploads/2023/12/image-5-600x294.png 600w, https://pythaverse.space/wp-content/uploads/2023/12/image-5.png 1315w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption"><em><em>Leanbot IDE page interface</em></em></figcaption></figure>
</div>


<h3 class="wp-block-heading"><a id="post-8590-_Toc152857028"></a>STEP 2. SELECT “CODE” AND CREATE NEW PROJECT</h3>



<ul class="wp-block-list">
<li>Select “<strong>CODE</strong>”</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="600" height="291" src="https://pythaverse.space/wp-content/uploads/2023/12/image-8.png" alt="" class="wp-image-8631" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-8.png 600w, https://pythaverse.space/wp-content/uploads/2023/12/image-8-300x146.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /><figcaption class="wp-element-caption"><em>Click &#8220;CODE&#8221;</em></figcaption></figure>
</div>


<ul class="wp-block-list">
<li>Create New Project: enter <strong>Project Name</strong> and click “<strong><kbd>CREATE</kbd></strong>”</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-5.png" alt="" class="wp-image-8598" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-5.png 505w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-5-300x238.png 300w" sizes="(max-width: 505px) 100vw, 505px" /><figcaption class="wp-element-caption"><em>Create a new project</em></figcaption></figure>
</div>


<h3 class="wp-block-heading"><a id="post-8590-_Toc152857029"></a>STEP 3. WRITING PROGRAMS FOR LEANBOT</h3>



<p class="wp-block-paragraph">On Leanbot IDE, users perform programming to run Leanbot as shown below:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6.png" alt="" class="wp-image-8600" style="width:800px" width="800" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6.png 1058w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6-300x153.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6-1024x521.png 1024w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6-768x391.png 768w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-6-600x305.png 600w" sizes="(max-width: 1058px) 100vw, 1058px" /><figcaption class="wp-element-caption"><em>Write Leanbot code</em></figcaption></figure>
</div>


<h3 class="wp-block-heading">STEP 4. CHECK THE PROGRAM ON PTUTOR</h3>



<p class="wp-block-paragraph">To better understand and check the correctness of your program, you can refer to PTutor in the section <strong>&#8216;PTUTOR USER GUIDE</strong>&#8216;.</p>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading"><a id="post-8590-_Toc152857030"></a>II. PTUTOR USER GUIDE</h2>



<h3 class="wp-block-heading">ACCESS TO PTUTOR</h3>



<p class="wp-block-paragraph"><strong>Click &#8220;PTUTOR&#8221; on Leanbot IDE</strong></p>


<div class="wp-block-image is-style-default">
<figure class="aligncenter is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-7.png" alt="" class="wp-image-8601" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-7.png 715w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-7-300x61.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-7-600x123.png 600w" sizes="(max-width: 715px) 100vw, 715px" /><figcaption class="wp-element-caption"><em>Click &#8220;<strong>PTUTOR</strong></em>&#8220;</figcaption></figure>
</div>


<p class="wp-block-paragraph"><strong>This is the PTutor interface</strong>:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-8.png" alt="" class="wp-image-8602" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-8.png 887w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-8-300x212.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-8-768x542.png 768w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-8-600x423.png 600w" sizes="(max-width: 887px) 100vw, 887px" /><figcaption class="wp-element-caption"><em>PTutor interface</em></figcaption></figure>
</div>


<h3 class="wp-block-heading">HOW TO USE PTUTOR</h3>



<p class="wp-block-paragraph">PTutor has four features, and its usage is as follows:</p>


<div class="wp-block-image">
<figure class="aligncenter is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-9.png" alt="" class="wp-image-8604" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-9.png 500w, https://pythaverse.space/wp-content/uploads/2023/12/word-image-8590-9-300x51.png 300w" sizes="(max-width: 500px) 100vw, 500px" /><figcaption class="wp-element-caption"><em>Select a PTutor feature</em></figcaption></figure>
</div>


<h4 class="wp-block-heading">Select &#8220;Explain the code for me&#8221;</h4>



<ul class="wp-block-list">
<li>You need to paste your code here, then click &#8220;<strong><kbd>Enter</kbd></strong>&#8221; to start. </li>



<li>For example: Copy and paste the provided sample code, then observe the results.</li>
</ul>



<figure class="wp-block-table aligncenter is-style-stripes"><table><tbody><tr><td>#include &lt;Leanbot.h&gt; // use Leanbot library void setup() { <p>Leanbot.begin(); // initialize Leanbot</p> } <p>void loop() {</p>LbMission.begin( TB1A + TB1B ); // start mission when both TB1A and TB1B touched <p>LbMotion.runLR( +1000, +1000 ); // go straight forward with speed 1000 steps/s</p>LbMotion.waitDistanceMm( 100 ); // for 100 mm distance <p>LbMission.end(); // stop, finish mission</p> } </td></tr></tbody></table></figure>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-2.png" alt="" class="wp-image-8616" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-2.png 720w, https://pythaverse.space/wp-content/uploads/2023/12/image-2-300x259.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-2-600x518.png 600w" sizes="(max-width: 720px) 100vw, 720px" /></figure>
</div>


<p class="wp-block-paragraph"></p>



<ul class="wp-block-list">
<li>PTutor will provide feedback promptly below:</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-1.png" alt="" class="wp-image-8615" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-1.png 720w, https://pythaverse.space/wp-content/uploads/2023/12/image-1-300x259.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-1-600x518.png 600w" sizes="(max-width: 720px) 100vw, 720px" /></figure>
</div>


<p class="wp-block-paragraph"></p>



<ul class="wp-block-list">
<li>You can utilize the chat feature to ask any additional questions if further clarification is needed, available in the &#8216;<strong>Chat here</strong>&#8216; box.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image.png" alt="" class="wp-image-8614" style="object-fit:cover;width:600px;height:515px" width="600" height="515" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image.png 720w, https://pythaverse.space/wp-content/uploads/2023/12/image-300x258.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-600x515.png 600w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>
</div>


<p class="wp-block-paragraph"></p>



<h4 class="wp-block-heading">Select &#8220;Help me debug the code&#8221;</h4>



<ul class="wp-block-list">
<li>You need to paste your code here, then click &#8220;<strong><kbd>Enter</kbd></strong>&#8221; to start. </li>



<li>For example: Copy and paste the provided sample code, then observe the results.</li>
</ul>



<figure class="wp-block-table aligncenter is-style-stripes"><table><tbody><tr><td>#include&nbsp;&lt;Leanbot.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;use&nbsp;Leanbot&nbsp;library<br><br>void setup() {<br>Leanbot.begin(); // initialize Leanbot<br>}<br><br>void loop() {<br>LbMission.begin( TB1A + TB1B ) // start mission when both TB1A and TB1B touched<br>LbMotion.runLR( +1000, +1000 ); // go straight forward with speed 1000 steps/s<br>LbMotion.waitDistanceMm( 100 ); // for 100 mm distance<br>LbMission.end(); // stop, finish mission<br>}</td></tr></tbody></table></figure>



<ul class="wp-block-list">
<li>PTutor will provide feedback promptly below:</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-3.png" alt="" class="wp-image-8618" style="object-fit:cover;width:600px;height:388px" width="600" height="388" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-3.png 772w, https://pythaverse.space/wp-content/uploads/2023/12/image-3-300x194.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-3-768x497.png 768w, https://pythaverse.space/wp-content/uploads/2023/12/image-3-600x389.png 600w" sizes="auto, (max-width: 600px) 100vw, 600px" /></figure>
</div>


<p class="wp-block-paragraph"></p>



<h4 class="wp-block-heading">Select &#8220;Example code for function&#8221;</h4>



<p class="wp-block-paragraph">Here, users can better understand the functions used to program Leanbot through specific examples.</p>



<ul class="wp-block-list">
<li>First, enter the function name. Just enter three characters, and PTutor will suggest functions from the corresponding Leanbot library for you to choose from.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-9.png" alt="" class="wp-image-8656" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-9.png 680w, https://pythaverse.space/wp-content/uploads/2023/12/image-9-300x100.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-9-600x200.png 600w" sizes="(max-width: 680px) 100vw, 680px" /></figure>
</div>


<ul class="wp-block-list">
<li>Next, select a function and press &#8220;Enter&#8221; to view example code. </li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-12.png" alt="" class="wp-image-8664" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-12.png 678w, https://pythaverse.space/wp-content/uploads/2023/12/image-12-300x254.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-12-600x507.png 600w" sizes="(max-width: 678px) 100vw, 678px" /></figure>
</div>


<ul class="wp-block-list">
<li>If you wish to view another function example, simply delete the selected one, enter a new function, and press Enter.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-13.png" alt="" class="wp-image-8665" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-13.png 705w, https://pythaverse.space/wp-content/uploads/2023/12/image-13-300x244.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-13-600x488.png 600w" sizes="(max-width: 705px) 100vw, 705px" /></figure>
</div>


<p class="wp-block-paragraph"></p>



<h4 class="wp-block-heading">Select &#8220;Example code to do a task&#8221;</h4>



<ul class="wp-block-list">
<li>Enter the task description and press enter. For example, Program Leanbot to open and close the gripper.</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-15.png" alt="" class="wp-image-8698" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-15.png 744w, https://pythaverse.space/wp-content/uploads/2023/12/image-15-300x245.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-15-600x490.png 600w" sizes="(max-width: 744px) 100vw, 744px" /></figure>
</div>


<ul class="wp-block-list">
<li>PTutor will provide feedback below. For example:</li>
</ul>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://pythaverse.space/wp-content/uploads/2023/12/image-14.png" alt="" class="wp-image-8696" style="width:600px" width="600" srcset="https://pythaverse.space/wp-content/uploads/2023/12/image-14.png 743w, https://pythaverse.space/wp-content/uploads/2023/12/image-14-300x162.png 300w, https://pythaverse.space/wp-content/uploads/2023/12/image-14-600x325.png 600w" sizes="(max-width: 743px) 100vw, 743px" /></figure>
</div>


<ul class="wp-block-list">
<li>Users can add additional prompts in the chat box.</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">8590</post-id>	</item>
	</channel>
</rss>
