SlideShare a Scribd company logo
1 of 17
DE LA SALLE UNIVERSITY
2401 Taft Avenue, Manila
LBYCPA1
LABORATORY ACTIVITY #1
(Basic Syntax, Variables, Data Types, Numbers, and Casting)
FINAL REPORT
LAST NAME, FIRST NAME M.I.
EQ4/MMW; 11:00-2:00
Submission Date: April 24, 2021
Ms. Blanca Bucao
Instructor
I. Laboratory Activity Title
The module 1 laboratory activity is titled Basic Syntax, Variables, Data Types, Numbers, and
Casting
II. Objectives
With this Module and Lab Activity, the students are expected to learn/accomplish the
following:
1. To learn to install and set-up Anaconda, Anaconda Prompt, Anaconda Navigator,
Stanford Karel, Spyder, and Jupyter Notebook.
2. To understand the basic concepts in programming.
3. To utilize formulas for computation in Python.
4. To learn the application and utilization of Phyton.
5. To illustrate how to use equations in software like Jupyter Notebook.
6. To learn the basic commands in Stanford-karel.
III. Materials, Software Tools, and Procedure
1. Anaconda Navigator
2. Jupyter Notebook
3. Stanford Karel
4. Spyder
5. Draw.io
Procedure
Karel the Robot
In activity 1, the students were tasked to write Python script where Karel creates your
middle initial using beepers. To accomplish this activity, stanford-karel must be run in the
Spyder software, located in Anaconda Navigator. Certain codes must be inputted first on the
Spyder so that stanford-karel could run. Once the program is running, the students must view
the karel website to see all the available commands that can help us accomplish this activity.
After inputting the codes, save the code and run the program. If there are any errors, simply
fix the code then reset and run the program. The final product must be beepers with a pattern
of your middle initial.
Volume
In activity 2, the task is to compute and print the resulting volume of each of the inputs of
the shapes, namely cube, rectangular prism, cylinder, cone, and sphere. To do this, the
students must first open Jupyter Notebook, located on Anaconda Navigator. Once the
program is opened, fill up the asked information and input the given formulas (Figure 1) for
each shape. In this activity, several different formulas have been used since there are a total
of five distinct shapes. Save and run the program to see if the printed output is correct or has
any errors. If the program has errors, just thoroughly check the spelling and the use of each
code. Test and run the programs over and over until you’ve reached the correct printed
output.
 Rectangular Prism
Let l = length of the sides
Let h = height of the rectangle
Let w = width of the sides
Vrectangularprism = l*w*h
 Cube
Let a = length of the edge a side of the prism
Vcube = 𝑎3
 Cylinder
Let r = radius of the circular face
Let h = height
Vcylinder = 𝜋𝑟2
ℎ
 Cone
Let r = radius of the circular base
Let h = height from the base to the tip
Vcone = (1/3) 𝜋𝑟2
ℎ
 Sphere
Let r = radius
Vsphere = (4/3) 𝜋𝑟3
IV. Problem (Machine Problem/Lab Activity Problem)
1. Activity 1: Karel the Robot- Write a code that illustrates the student’s middle initial using
beepers.
2. Activity 2: Volume Computation: Write a code that shows the printed output of the
volume of the five shapes: Cube, Rectangular Prism, Cylinder, Cone and Sphere.
V. Problem Definition/Analysis
Karel Robot
There are two given problems for the students. The first one was titled “Karel the Robot”.
It made the students use the following software: Spyder, Anaconda Navigator, Stanford-
Karel. The task given was to illustrate their middle name in Karel robot using beepers. Good
thing that the teacher provided a website wherein the students can see all the available
commands that can be used. Several testing and adjusting was done to make sure that the
beepers were at their proper place, allowing the Karel robot to illustrate a well-presented
middle initial.
There are two given problems for the students. The first one was titled “Karel the Robot”.
It made the students use the following software: Spyder, Anaconda Navigator, Stanford-
Karel. The first step to open Stanford karel is by opening Spyder. After opening spyder, the
student must input phrases that will allow the spyder to run Stanford karel. Once this is done,
the student can now put commands to test their karel.
The installation and testing of the karel is now done. The student can now put his
commands to put a letter “C” pattern made of beepers. The figure below will illustrate how karel
should run to perform a C pattern.
To do the figure above, a set of commands available at the Karel website was given by
the teacher. As seen in the illustration above, the student started first from right to left rather than
left to right. The reason being that since the pattern is letter C, if the student goes from left to
right to put beepers, the student cannot go in upward motion because if he/she does this, the
letter C would become inverted. Hence, the student must start from right to left to prevent not
going back again to start its upward motion.
In this activity, there are only three lines that are formed. First is the horizontal line to
make the first part of the C. The commands used are: twelve move(), five turn_left(), and six
put_beepers(). The second line is the vertical line that forms the second part of the C. The
commands used are: seven move(), three turn_left(), and six put_beepers(). The last or third line
is the horizontal to complete the pattern C. The commands used are: six move(), and six
put_beepers(). The figure below will be the result of the said used commands.
Volume Computations
The second problem was titled “Volume”. It tasked the students to make a program that
prints the computed volume of each shape. In the problem there were five shapes, namely: cube,
rectangular prism, cylinder, cone, and sphere. To start on this activity, students must first open
Anaconda Navigator, to open Jupyter Notebook.
Before learning to input the numbers and formulas, students should first learn to input a
variable and print the output. The students assigned “float” in their variables so that numbers
with decimals can be inputted. The students also placed “input” in their code since there is a
number that needs to be placed in order for the volume to be computed. Lastly, when printing the
output of the computation, the students need to declare how many decimals places in the output.
This was done by the students by inputting “{0.2f}” in the output. With this, it showcased output
with only two decimal places. The number of decimal places can be changed by changing the
number in the code. For example, “{0.4f}” the output of this code will now show 4 decimal
places.
The computation part was easily done since the teacher gave all the necessary formulas
needed in the problem. The students were reminded by the teacher to be very aware and critical
in coding, since one error can lead to the failure of the program. Each shape has a different
output since all of them has distinct formulas. Several trial and errors are done in this activity to
make sure that the printed output of each shape is correct. The shown figure below are the used
variables and formulas in the activity.
VI. Algorithm
Activity 1: Karel the Robot
Initial State
Final State
1. Open Spyder and input the necessary codes to run Karel Robot.
2. Move the Karel forward six times to start from right to left.
3. Make the Karel turn 270 degrees by making it turn left three times.
4. Start putting beeper continuously in every move.
5. Start moving to the left.
6. When the Karel is at the end of the wall. Start making it go up by first turning it to 270
degrees then moving up in a vertical direction.
7. Input the commands that illustrates a straight horizontal line.
8. Once the Karel is at the top of the wall. Make it turn 270 degrees.
9. Move the Karel to the right in a straight horizontal direction.
10. Stop until the sixth move. This is the end of the program
11. Test the program again and again to make sure there are no errors.
Activity 2: Volume
Algorithm 1: Rectangular Prism
1. Input the variables: l, w, h.
2. Place the formula: l*w*h
3. Print the output volume.
Algorithm 2: Cube
1. Input the variables: a
2. Place the formula: 𝑎3
3. Print the output volume.
Algorithm 3: Cylinder
1. Input the variables: pi, r, h
2. Place the formula: 𝜋𝑟2
ℎ
3. Print the output volume.
Algorithm 4: Cone
1. Input the variables: pi, r, h
2. Place the formula:
1
3
𝜋𝑟2
ℎ
3. Print the output volume.
Algorithm 5: Sphere
1. Input the variables: pi, r,
2. Place the formula:
4
3
𝜋𝑟3
3. Print the output volume.
VII. Flowchart
Activity 1: Karel Robot
Activity 2: Volume
Cone Sphere
VIII. Source Code
Activity 1: Karel the Robot
Activity 2: Volume
References
Stanfordkarel0.2.6., (n.d) Retrieved from https://pypi.org/project/stanfordkarel/

More Related Content

Similar to _MODULE1_FINALPAPER.docx

Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02auswhit
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.NandiniSidana
 
Problem solving techniques in c language
Problem solving techniques in c languageProblem solving techniques in c language
Problem solving techniques in c languageJohn Bruslin
 
Coding: Year 3-4 Teaching Ideas by Joanne Villis
Coding: Year 3-4 Teaching Ideas by Joanne VillisCoding: Year 3-4 Teaching Ideas by Joanne Villis
Coding: Year 3-4 Teaching Ideas by Joanne VillisJoanne Villis
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculatorScilab
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Study on grading the develop pattern in CAD.
Study on grading the develop pattern in CAD.Study on grading the develop pattern in CAD.
Study on grading the develop pattern in CAD.NazmulHasanAnan
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 manjurkts
 
Python week 4 2019 2020 for g10 by eng.osama ghandour
Python week 4 2019 2020 for g10 by eng.osama ghandourPython week 4 2019 2020 for g10 by eng.osama ghandour
Python week 4 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7helpido9
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7helpido6
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17manjurkts
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7solutionjug4
 
DSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdfDSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdfROWELL MARQUINA
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxmonicafrancis71118
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7ashhadiqbal
 
1 P a g e A semester of Experiments for ECE 225 .docx
1  P a g e  A semester of Experiments for ECE 225  .docx1  P a g e  A semester of Experiments for ECE 225  .docx
1 P a g e A semester of Experiments for ECE 225 .docxmercysuttle
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation filesantoshkumarhpu
 

Similar to _MODULE1_FINALPAPER.docx (20)

Lewis jssap3 e_labman02
Lewis jssap3 e_labman02Lewis jssap3 e_labman02
Lewis jssap3 e_labman02
 
Logic Development and Algorithm.
Logic Development and Algorithm.Logic Development and Algorithm.
Logic Development and Algorithm.
 
Problem solving techniques in c language
Problem solving techniques in c languageProblem solving techniques in c language
Problem solving techniques in c language
 
Coding: Year 3-4 Teaching Ideas by Joanne Villis
Coding: Year 3-4 Teaching Ideas by Joanne VillisCoding: Year 3-4 Teaching Ideas by Joanne Villis
Coding: Year 3-4 Teaching Ideas by Joanne Villis
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
 
Problem solving and design
Problem solving and designProblem solving and design
Problem solving and design
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Study on grading the develop pattern in CAD.
Study on grading the develop pattern in CAD.Study on grading the develop pattern in CAD.
Study on grading the develop pattern in CAD.
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
Python week 4 2019 2020 for g10 by eng.osama ghandour
Python week 4 2019 2020 for g10 by eng.osama ghandourPython week 4 2019 2020 for g10 by eng.osama ghandour
Python week 4 2019 2020 for g10 by eng.osama ghandour
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
DSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdfDSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdf
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7Comp 220 ilab 7 of 7
Comp 220 ilab 7 of 7
 
1 P a g e A semester of Experiments for ECE 225 .docx
1  P a g e  A semester of Experiments for ECE 225  .docx1  P a g e  A semester of Experiments for ECE 225  .docx
1 P a g e A semester of Experiments for ECE 225 .docx
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation file
 

Recently uploaded

Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 

Recently uploaded (20)

Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 

_MODULE1_FINALPAPER.docx

  • 1. DE LA SALLE UNIVERSITY 2401 Taft Avenue, Manila LBYCPA1 LABORATORY ACTIVITY #1 (Basic Syntax, Variables, Data Types, Numbers, and Casting) FINAL REPORT LAST NAME, FIRST NAME M.I. EQ4/MMW; 11:00-2:00 Submission Date: April 24, 2021 Ms. Blanca Bucao Instructor
  • 2.
  • 3. I. Laboratory Activity Title The module 1 laboratory activity is titled Basic Syntax, Variables, Data Types, Numbers, and Casting II. Objectives With this Module and Lab Activity, the students are expected to learn/accomplish the following: 1. To learn to install and set-up Anaconda, Anaconda Prompt, Anaconda Navigator, Stanford Karel, Spyder, and Jupyter Notebook. 2. To understand the basic concepts in programming. 3. To utilize formulas for computation in Python. 4. To learn the application and utilization of Phyton. 5. To illustrate how to use equations in software like Jupyter Notebook. 6. To learn the basic commands in Stanford-karel. III. Materials, Software Tools, and Procedure 1. Anaconda Navigator 2. Jupyter Notebook 3. Stanford Karel 4. Spyder 5. Draw.io Procedure Karel the Robot In activity 1, the students were tasked to write Python script where Karel creates your middle initial using beepers. To accomplish this activity, stanford-karel must be run in the Spyder software, located in Anaconda Navigator. Certain codes must be inputted first on the Spyder so that stanford-karel could run. Once the program is running, the students must view the karel website to see all the available commands that can help us accomplish this activity. After inputting the codes, save the code and run the program. If there are any errors, simply fix the code then reset and run the program. The final product must be beepers with a pattern of your middle initial. Volume In activity 2, the task is to compute and print the resulting volume of each of the inputs of the shapes, namely cube, rectangular prism, cylinder, cone, and sphere. To do this, the students must first open Jupyter Notebook, located on Anaconda Navigator. Once the program is opened, fill up the asked information and input the given formulas (Figure 1) for
  • 4. each shape. In this activity, several different formulas have been used since there are a total of five distinct shapes. Save and run the program to see if the printed output is correct or has any errors. If the program has errors, just thoroughly check the spelling and the use of each code. Test and run the programs over and over until you’ve reached the correct printed output.  Rectangular Prism Let l = length of the sides Let h = height of the rectangle Let w = width of the sides Vrectangularprism = l*w*h  Cube Let a = length of the edge a side of the prism Vcube = 𝑎3  Cylinder Let r = radius of the circular face Let h = height Vcylinder = 𝜋𝑟2 ℎ  Cone Let r = radius of the circular base Let h = height from the base to the tip Vcone = (1/3) 𝜋𝑟2 ℎ  Sphere Let r = radius Vsphere = (4/3) 𝜋𝑟3 IV. Problem (Machine Problem/Lab Activity Problem) 1. Activity 1: Karel the Robot- Write a code that illustrates the student’s middle initial using beepers. 2. Activity 2: Volume Computation: Write a code that shows the printed output of the volume of the five shapes: Cube, Rectangular Prism, Cylinder, Cone and Sphere. V. Problem Definition/Analysis Karel Robot There are two given problems for the students. The first one was titled “Karel the Robot”. It made the students use the following software: Spyder, Anaconda Navigator, Stanford- Karel. The task given was to illustrate their middle name in Karel robot using beepers. Good thing that the teacher provided a website wherein the students can see all the available commands that can be used. Several testing and adjusting was done to make sure that the
  • 5. beepers were at their proper place, allowing the Karel robot to illustrate a well-presented middle initial. There are two given problems for the students. The first one was titled “Karel the Robot”. It made the students use the following software: Spyder, Anaconda Navigator, Stanford- Karel. The first step to open Stanford karel is by opening Spyder. After opening spyder, the student must input phrases that will allow the spyder to run Stanford karel. Once this is done, the student can now put commands to test their karel. The installation and testing of the karel is now done. The student can now put his commands to put a letter “C” pattern made of beepers. The figure below will illustrate how karel should run to perform a C pattern.
  • 6. To do the figure above, a set of commands available at the Karel website was given by the teacher. As seen in the illustration above, the student started first from right to left rather than left to right. The reason being that since the pattern is letter C, if the student goes from left to right to put beepers, the student cannot go in upward motion because if he/she does this, the letter C would become inverted. Hence, the student must start from right to left to prevent not going back again to start its upward motion. In this activity, there are only three lines that are formed. First is the horizontal line to make the first part of the C. The commands used are: twelve move(), five turn_left(), and six put_beepers(). The second line is the vertical line that forms the second part of the C. The commands used are: seven move(), three turn_left(), and six put_beepers(). The last or third line is the horizontal to complete the pattern C. The commands used are: six move(), and six put_beepers(). The figure below will be the result of the said used commands.
  • 7. Volume Computations The second problem was titled “Volume”. It tasked the students to make a program that prints the computed volume of each shape. In the problem there were five shapes, namely: cube, rectangular prism, cylinder, cone, and sphere. To start on this activity, students must first open Anaconda Navigator, to open Jupyter Notebook. Before learning to input the numbers and formulas, students should first learn to input a variable and print the output. The students assigned “float” in their variables so that numbers with decimals can be inputted. The students also placed “input” in their code since there is a number that needs to be placed in order for the volume to be computed. Lastly, when printing the output of the computation, the students need to declare how many decimals places in the output. This was done by the students by inputting “{0.2f}” in the output. With this, it showcased output with only two decimal places. The number of decimal places can be changed by changing the number in the code. For example, “{0.4f}” the output of this code will now show 4 decimal places. The computation part was easily done since the teacher gave all the necessary formulas needed in the problem. The students were reminded by the teacher to be very aware and critical in coding, since one error can lead to the failure of the program. Each shape has a different output since all of them has distinct formulas. Several trial and errors are done in this activity to
  • 8. make sure that the printed output of each shape is correct. The shown figure below are the used variables and formulas in the activity. VI. Algorithm Activity 1: Karel the Robot Initial State
  • 9. Final State 1. Open Spyder and input the necessary codes to run Karel Robot. 2. Move the Karel forward six times to start from right to left. 3. Make the Karel turn 270 degrees by making it turn left three times. 4. Start putting beeper continuously in every move. 5. Start moving to the left. 6. When the Karel is at the end of the wall. Start making it go up by first turning it to 270 degrees then moving up in a vertical direction. 7. Input the commands that illustrates a straight horizontal line. 8. Once the Karel is at the top of the wall. Make it turn 270 degrees. 9. Move the Karel to the right in a straight horizontal direction. 10. Stop until the sixth move. This is the end of the program 11. Test the program again and again to make sure there are no errors. Activity 2: Volume Algorithm 1: Rectangular Prism 1. Input the variables: l, w, h. 2. Place the formula: l*w*h 3. Print the output volume. Algorithm 2: Cube 1. Input the variables: a 2. Place the formula: 𝑎3 3. Print the output volume.
  • 10. Algorithm 3: Cylinder 1. Input the variables: pi, r, h 2. Place the formula: 𝜋𝑟2 ℎ 3. Print the output volume. Algorithm 4: Cone 1. Input the variables: pi, r, h 2. Place the formula: 1 3 𝜋𝑟2 ℎ 3. Print the output volume. Algorithm 5: Sphere 1. Input the variables: pi, r, 2. Place the formula: 4 3 𝜋𝑟3 3. Print the output volume. VII. Flowchart Activity 1: Karel Robot
  • 12.
  • 14. VIII. Source Code Activity 1: Karel the Robot
  • 16.
  • 17. References Stanfordkarel0.2.6., (n.d) Retrieved from https://pypi.org/project/stanfordkarel/