+ All Categories
Home > Documents > CALCULATOR FOOTPRINT CARBON

CALCULATOR FOOTPRINT CARBON

Date post: 16-Oct-2021
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
12
CARBON FOOTPRINT CALCULATOR BROUGHT TO YOU BY CODE CLUB AUSTRALIA POWERED BY TELSTRA FOUNDATION SUBMIT AND BE COUNTED AT MOONHACK.COM BURMESE
Transcript
Page 1: CALCULATOR FOOTPRINT CARBON

CARBONFOOTPRINT

CALCULATOR

BROUGHT TO YOU BY CODE CLUB AUSTRALIA POWERED BY TELSTRA FOUNDATION

SUBMIT AND BE COUNTED ATMOONHACK.COM

BURMESE

Page 2: CALCULATOR FOOTPRINT CARBON

Carbon Calculator

မတဆက

Our personal contribution to the world’s carbon emissions is called our Carbon Footprint. If there is

too much carbon being produced the world will continue to heat beyond repair.

ကမဘာကက ြး ၏ ကာဗနထတလငခြငြးမ ာြးတင ကျနပတ ၏ တကယရေ ပါဝငပတသတခြငြးက ကျနပတ ၏

Carbon Footprint ကာဗနရခြော ဟ ရြေါသည။ အကယ၍ ကာဗနက အလနအကျျထတလပပါက

ကမဘာကက ြးသည ခပနလညခပငဆငနငသည အရခြအရနထက ရက ာလန၍ အပလနကလာပါမည။

There are a number of tools online that help us to measure our carbon footprint, which can also help

us to better understand how to lessen our impact on the planet.

ကျနပတ ၏ ကာဗနရခြောက တငြးတာနငသည ကေယာမ ာြး ရ ပါသည။ ၎ငြးတ သည ကမဘာရခမအရပေါ

ကျနပတ မညမျ သကရောကမရ သညက ပမ နာြးလညလာရေေန ကည ရပြးနငသည။

What you will make သင ခပြလပေမညအော။

In this project, we will create a simplified carbon footprint calculator that can help people to

understand their personal impact.

ယြ ပရောဂ ကတင လအမ ာြးက သတ ၏ တကယရေ သကရောကနငမက နာြးလညလာရအာင

ကည ရပြးနငသည ရြးရ ငြးလယကရသာ ကာဗနရခြောဂဏနြးတကေကတေြက ကျနပတ ဖနတ ြးေပါမယ။

Page 3: CALCULATOR FOOTPRINT CARBON

What you will learn သင ရလလာေမည အောမ ာြး။

• Loop through data in a list

• Sum values based on user input

• Dynamically format strings

• Validate input

• List တေြအတငြးရ data မ ာြးက loop ပတခြငြး။

• User input ရပေါ မတည၍ တနဖြးမ ာြးက ရပါငြးခြငြး။

• ောရ ကာငြး(String)မ ာြးက

What you will need HARDWARE – a computer capable of accessing Trinket online. You do not need a Raspberry Pi to

complete this project.

DOWNLOADS

Starter Code - https://trinket.io/embed/python/d504a518be

Additional notes for educators Here is a link to the completed project - https://trinket.io/python/bd3506101e

Step 1: List the questions and answers အရမြး၊အရခဖမ ာြးက List ောေငြးခပြေခြငြး

First, we want to ask the user some questions, and provide them with the possible answers that will

allow us to measure their carbon footprint.

ပထမဆျြး ကျနပတ အရနန အသျြးခပြသက ရမြးြနြးအြ ြျ ရမြးေပါမယ။ဒ ရနာက သတ က ခဖေနငရြ ရ ရသာ

အရခဖမ ာြး ရထာကပျရပြးပ ြး သတ ေ ကာဗနရခြော တငြးတာမ ာ ခဖေပါတယ။

• Open the starter project at https://trinket.io/embed/python/d504a518be

• ယြ Link အတငြး ကနဥ ြးပရောဂ ကက ဖငပါ - https://trinket.io/embed/python/d504a518be

• On the left is your code window, on the right is the result of your code. You can click the

“Run” button to run your code. You’ll notice that the first 2 lines have already been written

for you.

• ဘယခြမြးသည သင ကဒရေြးေမယရနောခဖေပပ ြး ညာခြမြးသည သင ကဒေလာဒက

ခပသမညရနောခဖေသည။ “Run” ြလတက န ပ၍ သငကဒက အလပလပြငြးနငသည။ ပထမဆျြး ၂

ရ ကာငြးက သငအတက ရေြးထာြးပပ ြးခဖေသညက သတထာြးမပါလမမယ။

Page 4: CALCULATOR FOOTPRINT CARBON

The first line tells us to use version 3 of Python, the second gets the data for our carbon

calculator.

ပထမတေရ ကာငြးက Python ဗာြးရ ငြး ၃ က အသျြးခပြမယအရ ကာငြး ရခပာထာြးတာပါ။

ဒတယတေရ ကာငြးက Carbon calculator ကရန ရဒတာက ေယထာြးတာ ခဖေပါတယ။

• Our data consists of a series of questions, with each of the answers given a value for how

much carbon we’re using.

• ကျနရတာတ ေ ရဒတာမ ာ ရမြးြနြးေ ြးေ ြးလက ပါရ ပါတယ။ အရခဖတေြြ ငြးဆ မ ကျနရတာတ

အသျြးခပြသမျ ကာဗနပမာဏအတက သတမ တထာြးပပ ြး ခဖေတယ။

• Let’s start by listing out all the questions. To do this, we’ll write a ‘for’ loop that will give us

each of the questions in turn:

• ရမြးြနြးအာြးလျြးက List ခပြလပခြငြးခဖင ေတငေရအာင။ ရမြးြနြးတေြြ ငြးဆ ထကလာနငဖ ‘for’

loop တေြက ရေြးေပါမယ။

• We want to write out each question. To do this, we’ll use the ‘print’ command:

• ရမြးြနြးတငြးက ောသာြးထကလာရေြ ငတာ ခဖေတယ။ ဒါ အတကရ ကာင ‘print’ command က

အသျြးခပြေပါမယ။

• Run your program using the ‘Run’ button. In your Result window, you should see a list of

questions.

• ‘Run’ ြလတက န ပပပ ြး သငေ ပရဂေမက အလပြငြးလကတအြါမ ာ ေလာဒခပသောရနောမ ာ

ရမြးြနြး List က ခမငေမ ာပါ။

• For each question, we want to list out the answers. Add a second loop that outputs all the

possible answers to the question:

Page 5: CALCULATOR FOOTPRINT CARBON

• ရမြးြနြးတေြြ ငြးဆ အတက အရခဖမ ာြးက list ခပြလပြ ငပါတယ။ ဒါရ ကာင ခဖေနငရြ ရ တ

အရခဖမ ာြးအာြးလျြးက ရမြးြနြးတငြးမ ာ ထညရေဖ ဒတယအကကမ loop တေြ ထပထညေပါမယ။

• We want to number our answers to give the user something easy to type in. First, we need

to set an initial value for our number:

• အရခဖမ ာြးက နျပါတေဥခြငြးအာြးခဖင အသျြးခပြသအရနန ရေြးြ ယေ လယကရေြ ငပါတယ။

ဒါရ ကာင ကျနရတာတ နျပါတအတက ကနဥ ြးတနဖြး က သတမ တဖ လပါတယ။

When programming we often use the letter ‘i’ to indicate a counting number.

ကဒရေြးတအြါမ ာ i ောလျြးက ရေတကဂဏနြးအခဖေ မ ကာြန အသျြးခပြရလ ရ ပါတယ။

• Next, we need to increase the value of ‘i’ every time we go around our answer for loop:

• ဒ ရနာက ကျနရတာတ အရခဖအတက Loop ပတတငြး i တနဖြးက တြးသာြးရေဖ လပါတယ။

• Now we can add this to the text of our answer:

• ဒ i တနဖြးက ကျနရတာတ အရခဖ ောရ ကာငြးအတငြးမ ာ ထပရပါငြးထညနငပါတယ။

• Run your program. You should now get all of the questions with numbered answers.

• သငပရဂေမက run လကပါ။ ရမြးြနြးမ ာြးအာြးလျြးအတက နျပါတေဥအလကအရခဖမ ာြးက ေရ မ ာ

ခဖေပါတယ။

Step 2: Totalling it all up Next, we will get all the user’s responses and total up their emissions.

ကျနရတာတ အရနန အသျြးခပြသထျမ တန ခပနြ ကအာြးလျြးက ေယပပ ြး သတ ေ (ကာဗန)ထတလငမပမာဏ

က ေေရပါငြးေပါမယ။

• Now that we’re asking the user a question, we need to get their answer. Add the following

code to ask the user for their answer and store it in the variable named “response”:

Page 6: CALCULATOR FOOTPRINT CARBON

• ယြ ကျနရတာတ က အသျြးခပြသထျ ရမြးြနြးရမြးပပ ြးသညရနာက အရခဖက လကြျေန

လအပပါတယ။ အသျြးခပြသ ၏ အရခဖက ရမြးခမနြးပပ ြး “response” ဆသည variable အတငြး

သမြးဆညြးသည code က ရအာကပါအတငြး ထပထညပါ။

• For the question, we want to get the carbon amount from the relevant answer. Add the

code to print out the amount of carbon:

• အရခဖမ တဆင ကာဗနပမာဏက ေရ ြ ငပါတယ။ ကာဗနပမာဏ က print ထတရပြးေန ရအာကပါ

code က ထပထညပါ။

• Run your program. What happens when you try and put in a response? You probably get an

error saying:

• ပရဂေမ က run လကတအြါမ ာ မညသ ရသာ တန ခပနမ ေရ ပါသလ ။ သငအရနန

ရအာကပါအတငြး error ေရကာငြးေနငပါလမမယ။

• The reason we get this error is because the input command gives us a string (text) instead of

an integer (number). We need to convert our response into a number before we can use it:

• အဆပါ error ေရ တ အရ ကာငြးေငြးက input command က integer (ဂဏနြး) အောြး string

(ောသာြး) က ထတရပြးရသာရ ကာင ခဖေသည။ ကျနရတာတ အရနန အရခဖက အသျြးမခပြြင

number(ဂဏနြး)အခဖေ ရခပာငြးလဖ လပါတယ။

• Run your program again. That’s better.

• ပရဂေမက ထပမျ run ပါ။ ပမရကာငြးမနတ ေလဒ ေပါလမမယ။

• Instead of showing the amount of carbon after each step, we want to keep a running tally

and display it after we’ve asked all the questions. First, we need to initialise our total to 0

before we start our question loop:

• ကာဗနပမာဏက တဆငြ ငြးဆ တငြး ခပသြ ငြးထက ေေရပါငြးအရနခဖင သမြးဆညြးထာြးပပ ြး

ရမြးြနြးမ ာြးအာြးလျြးက ရမြးပပ ြးရနာက ခပသလပါသည။ ပထမဆျြး ကျနရတာတ အရနန ရမြးြနြး

Page 7: CALCULATOR FOOTPRINT CARBON

Loop က မေတငမ ေေရပါငြးတနဖြး က သည(0) အခဖေ သတမ တေနလပါတယ။

• Instead of printing out the amount of carbon used after each question, we want to add it to

the total:

• ရမြးြနြးတြြ ငြးဆ အပပ ြးမ ာ ကာဗနပမာဏ က ခပသမညအောြး ၎ငြးတနဖြးက ေေရပါငြးတနဖြး

(total) ထသ ရပါငြးထညေပါမယ။

• Finally, we want to print this out after we’ve finished looping through the questions:

• ရနာကဆျြးအာြးခဖင ရမြးြနြးမ ာြးအာြးလျြးရမြးပပ ြးသညရနာက ၎ငြးေေရပါငြးတနဖြးက ခပသပါမယ။

Note that we don’t have any spaces in front of line 16. The spaces are called ‘indenting’ and

they tell Python that a command is in the loop. We don’t want our print statement to be in

the loop, so we don’t want it to be indented. Make sure this code is right against the edge.

ောရ ကာငြးနျပါတ ၁၆ တင မညသည space (ကကလပ) မ ောရ ကာငြးအရရ ျတင ရ မရနသညက

သတခပြပါ။ အဆပါ space (ကကလပမ ာြး)က ‘indenting’ လ ရြေါရဝေါ ပပ ြး ၎ငြးတ က command

ောရ ကာငြးတေြသည Loop အတငြးရ သည က Python အာြး ရခပာခပပါသည။ ကျနရတာတ အရနန

print ောရ ကာငြးက Loop အတငြးမ ာ ရ မရနရေြ ငတအတက ၎ငြးက indent ခပြလပေနမလပါ ။

အဆပါ code သည အေနြးန င ကပလ ကရ ရနဖ ရသြ ာပါရေ။

• Run your program. You should be able to answer all of the questions and get an answer at

the end.

• သင၏ ပရဂေမက run ပါ။ သငအရနန ရမြးြနြးမ ာြးအာြးလျြးက ရခဖဆနငမ ာ ခဖေပပ ြး အဆျြးမ ာ

အရခဖတေြ ေရ ပါလမမယ။

• Currently, the program is just spitting out a number. Let’s make that number a bit more user

friendly. Update your print line to the following to give your user some context to the

number:

• ယြ ပရဂေမအရနန ဂဏနြးေလဒကသာ ထတရပြးပါရသြးတယ။ ဒါရ ကာင ဒ ေလဒက

အသျြးခပြသအတက ပအဆငရခပရအာငခပငဆငရပြး ကေ ။ သငေ print ောရ ကာငြးက ရအာကပါ

Page 8: CALCULATOR FOOTPRINT CARBON

code အတငြး ဂဏနြးအခပင အခြာြးရသာေကာြးေမ ာြး ထညသငြးရပြးေန update ခပြလပပါ။

• Run your program again. You should now get the total CO2 emitted displayed in a readable

format.

• သငပရဂေမက ရနာကတကကမ run ပါ။ သငအရနခဖင ေေရပါငြး CO2 ထတလတမပမာဏ က

ဖတရေလယကရသာ ပျေျခဖင ခမငေပါလမမယ။

Step 3: Input validation You have a working CO2 calculator, but what happens if the user enters a number that the program

isn’t expecting, or something that isn’t a number at all? Did you see an error called “IndexError”? In

the next step we’ll validate the user input so that if they enter something incorrect, it doesn’t crash

the whole program.

သငမ ာ အလပလပရနပပ ခဖေတ CO2 calculator တေြ ရ ရနပါပပ ။ဒါရပမယ အသျြးခပြသက ပရဂေမက

လကြျမထာြးရသာ ကနြးဂဏနြးတေြြ(သ ) ကနြးဂဏနြးမဟတသညောရ ကာငြးတေြြက

ထညသငြးရသာအြါ မညကသ မ ြြး ခဖေပာြးပါသလ။ “IndexError” ဟ ရြေါရသာ ခပဿနာမ ြြးက

ခမငရတျေပါသလာြး။ ရနာကတေဆငတင မ ာြးယငြးရသာအောတေြြ ထညသငြးပါက ပရဂေမတေြလျြးက

ခပဿနာမခဖေပာြးရေေန ကျနရတာတ အရနန အသျြးခပြသ၏ ထညသငြးမက ေ ေေေပါလမမယ။

• The first step in validation is to tell the user what is expected. Let’s tell our user what is

expected of them when you ask them for their answer:

• ေ ေေောမ ာ ပထမအဆငအရနန အသျြးခပြသက ဘာရတ ခဖညသငြးဖ ရမျာလငထာြးတယဆတာ

ရခပာဖ လပါတယ။ ဒါရ ကာင သတ ဆ က အရခဖက ရမြးတအြါ အသျြးခပြသက ဘာရတ

ရမျာလငထာြးတယဆတာ ကကြတငရခပာေပါမယ။

The ‘format’ command might be a little confusing, but for now all you need to know is that it

replaces ‘{}’ with the number stored in ‘i’.

‘format’ command က အနညြးငယ နာြးလညေြကပါလမမယ။ ဒါရပမယ ‘{}’ တငြးက ဂဏနြးက

‘i’ တနဖြးန အောြးထြးဖ ော အသျြးခပြတယလ ပ အြ သထာြးေင အဆငရခပပါတယ။

• Run your program. You might notice that the range given is one larger than the number of

options. Oh no! We can fix this substituting “i-1” instead of “i” in format:

• သင ပရဂေမက run ပါ။ ရပြးထာြးတ range အတငြးမ ာ တေ ထကပတ ဂဏနြးရေြးြ ယမ

ခဖေရနတာက ရတျေပါလမမယ။ ဒါက ရခဖရ ငြးဖ အတက format ရနောမ ာ “I” အောြး “i-1” က

Page 9: CALCULATOR FOOTPRINT CARBON

အောြးထြးေပါမယ။

• Run your program again. That’s better!

• ပရဂေမက ထပမျ run ပါ ။ ပမရကာငြးမနလာတာ ရတျေပါလမမယ။

• Now we’re telling the user what to enter, they should get it right, but just because they

should get it right, it doesn’t mean they will! Everyone makes mistakes, and some people

will deliberately try and break programs (that’s one of the ways that hackers can break into

computers). We still need to check that the input is valid.

• ယြ ကျနရတာတ က အသျြးခပြသ က ဘာထညသငြးေမယဆတာ ရခပာရနတအတငြး

အသျြးခပြသအရနန မ နမ နကနကန ထညသငြးနငပါတယ။ ဒါရပမယလ ေတမြ ေရသြးပါဘြး ။

လတငြးက အမ ာြးရတ လပနငပါတယ။ အြ ြျလရတက မေညေယပ အမ ာြးခပြလပမပပ ြး ပရဂေမက

ဖ ကေ ြးမတာမ ြြးရတ ရ နငပါတယ။ ဒါရ ကာင ကျနရတာတ အရနန ထညသငြးမ input က

မ နကနခြငြးရ /မရ ေေရဆြးဖ လအပပါတယ။

• Let’s start by checking that a number is actually entered before we tell python to convert it

into a number:

• ကျနရတာတ အရနန input က ဂဏနြးအခဖေ မရခပာငြးလမ အဆပါ ဂဏနြးက အမ နတကယ

ထညသငြးခြငြးရ /မရ က ေတငေေရဆြးေရအာင။

Note that we’ve indented line 14 to the next level to tell Python that it’s inside the if

statement.

ောရ ကာငြးနျပါတ ၁၄ မ ာ if statement အတငြး ရ ရ ကာငြး သသာေန indent

(ကကလပခြာြးထာြးသည) က သတခပြပါ။

• If the user enters something that isn’t a digit, we should tell them that they need to enter a

number:

• အကယရေျ အသျြးခပြသအရနခဖင ဂဏနြး ထညသငြးခြငြး မခပြပါက ကျနရတာတ အရနခဖင

ဂဏနြးကသာ ထညသငြးဖ လရ ကာငြး ရအာကပါအတငြး အသရပြးေပါမယ။

• Next, we need to validate the number, to ensure that it’s in the right range, only then will

we add the number to the total. Add the ‘if’ below, and indent the existing ‘total +=’ line:

• ထ ရနာက ကျနရတာတ အရနန ထညသငြးရသာ ဂဏနြးသည မ နကနရသာ range အတငြးတင

ရ ရနသညက ေေရဆြးေနလသည။ သညရနာကမ အဆပါ ဂဏနြးက ေေရပါငြးတနဖြး total ထသ

Page 10: CALCULATOR FOOTPRINT CARBON

ရပါငြးထညမည။ ရအာကတငခပထာြးသညအတငြး ‘if’ ရနာကဆကတောရ ကာငြးမ ာြးက ထညပါ။

‘total +=’ ောရ ကာငြးတင indent ခပြလပပါ။

• Run your program. What happens if the user enters something wrong? It doesn’t break the

program anymore, but it just goes on to ask the next question, and so won’t give an accurate

result. We want to ask the user the question again and again until they give a valid response.

• သင၏ ပရဂေမက run ပါ ။ အကယ၍ အသျြးခပြသက အမ ာြးတေြထညပါက မညသ ခဖေပါသလ?

၎ငြးသည ပရဂေမက မဖ ကေ ြးရတာရသာလညြး ရနာကရမြးြနြးကသာ

ဆကလကရမြးမညခဖေရသာရ ကာင မ နကနရသာအရခဖ ေရ မည မဟတပါ။ ထ ရ ကာင

ကျနရတာတ သည အသျြးခပြသအရနခဖင မ နကနရသာ ထညသငြးမ မခဖေမြ ငြး

အဆပါရမြးြနြးကသာ ထပြါထပြါ ရမြးခမနြးေနလအပသည။

• To achieve this, we’ll use a while loop. This will keep looping through until the condition is

satisfied (in this case, we get a valid response). Start by initialising a Boolean variable:

• ထသ ခဖေရေေန ကျနရတာတ အရနခဖင while loop က အသျြးခပြေလမမည။

မ နကနရသာအရခြအရနမခဖေမြ ငြး (မ နကနရသာ ထညသငြးမ မခဖေမြ ငြး) ၎ငြးသည

ထပြါထပြါ looping ပတရနလမမယ။ Boolean variable (အမ ာြး/အမ နေ ေေရသာ variable) ခဖင

ေတငပါ။

We will assume a response is not valid until we’ve checked everything required to tell us

that it is.

လအပသညမ ာြးအာြးလျြးက ေ ေေမမပပ ြးမြ ငြး ထညသငြးမ က မ ာြးယငြးသညဟ ကနဥ ြး

ယဆထာြးပါမယ။

• Our while loop will run all of our validations:

Page 11: CALCULATOR FOOTPRINT CARBON

• While loop အတငြးတင ကျနရတာတ ၏ ေေရဆြးမမ ာြးအာြးလျြးက run ပါမယ။

Note that we’ve indented everything up to line 21 to another level. You can do this by

highlighting all of the code between lines 14-21 that you want to indent and pressing the

TAB key.

ောရ ကာငြးနျပါတ ၂၁ အထ အာြးလျြးက indent ခပြလပထာြးေနလအပသည။ ောရ ကာငြး ၁၄ မ ၂၁

အတငြးရ code မ ာြးအာြးလျြးက select ခပြလပထာြးပါ။ အဆပါောရ ကာငြးမ ာြးတင highlight

ခဖေရနလမမည။ ထအြါ indent ခပြလပေနအတက TAB key က န ပပါ။

• If you run your program now, you will be stuck in an endless loop, because we never set

valid to True. Let’s do that if our number is between the correct range:

• သငအရနခဖင ပရဂေမက ယြ run ပါက အဆျြးမသတနငရသာ loop အတငြးတင

ပတမရနလမမည။ အဘယရ ကာငဆရသာ ကျနရတာတ သည valid က True အခဖေ

မသတမ တြရသာရ ကာင ခဖေတယ။ ထ ရ ကာင ကျနရတာတ ၏ ထညသငြးမ ဂဏနြးသည

မ နကနရသာ range အတငြးတင ရ ပါက valid က True အခဖေ သတမ တပါ။

Note that we’ve moved line 23 out of the if statement and the while loop by decreasing the

indent by two levels. We did this by using the backspace at the beginning of the line.

ောရ ကာငြးအမ တ ၂၃ က if statement န င while loop တ ၏ အခပငဖကသ indent level ၂ြ

ရနာကသ ရေျ ခြငြးခဖင ရခပာငြးလထာြးသည။ ောရ ကာငြးအေတင backspace န ပခြငြးခဖင ရနာကသ

ရေျပါသည။

• If the user enters a number outside of the correct range, we should tell them what they’ve

done wrong:

Page 12: CALCULATOR FOOTPRINT CARBON

• အကယ၍ အသျြးခပြသအရနခဖင မ နကနရသာ range အခပငဖကရ ဂဏနြးတေြက ထညမပါက

ကျနရတာတ အရနခဖင မ ာြးယငြးရနရ ကာငြး ရဖာခပေပါမယ။

• Run your program. It should now be working and correctly validating user responses.

• သငေ ပရဂေမက run ပါ ။ ၎ငြးသည အသျြးခပြသ၏ ထညသငြးမမ ာြးအရပေါ မ နကနော

ေ ေေပပ ြးရနာက ရကာငြးော အလပလပရနပါလမမယ။

Congratulations- ဂဏယဝမြးရခမာကခြငြး

You have finished the project. You can try one of our other projects or continue with the challenges

below.

သငအရနခဖင ပရောဂ ကက ရအာငခမငော ပပ ြးဆျြးသာြးပါပပ ။ အခြာြးရသာပရောဂ ကမ ာြးက

ဆကလကကကြြးောြးနငပါသည (သ မဟတ) ရအာကတငရဖာခပထာြးသည ေနရြေါမမ ာြးက

ဆကလကရခဖရ ငြးနငသည။

Don’t forget to talk with an adult about registering for Moonhack and downloading your certificate

at Moonhack.com

Moonhack အတက register ောေငြးရပြးသငြးေန သင၏ အပထနြးသက ရခပာဖ မရမပါန ။ သငအတက

ဂဏခပြလကမ တက Moonhack.com မ တဆင ရဒါငြးလဒေယနငပါသည။

Challenge: On repeat - ေနရြေါမ

Can you loop through the entire program so that multiple people can use the carbon calculator

without having to reset it every time?

အြ နတငြး ပရဂေမက reset ြ ေန မလပ အသျြးခပြသမ ာြး(ော) မ ကာဗန calculator က

ဆကတကအသျြးခပြနငေန သငအရနခဖင ပရဂေမတေြလျြးက loop ပတနငပါသလာြး။

Advanced Challenge: Graph the result Can you graph the carbon footprints of your classmates? If you want to graph it in Python, check out

the Popular Pets Code Club project.

သင၏ အတနြးရဖာမ ာြးေ ကာဗနရခြော (carbon footprint) မ ာြးက graph ပျရဖာနငပါသလာြး? Python

တင graph ပျခပြလပြ ငပါက Popular Pets Code Club project က ကညရပါ။


Recommended