Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » help with snap program
- glxbl
-
New Scratcher
11 posts
help with snap program
1. Write a SNAP program that asks the user for the lengths of all three sides of a triangle. Store each length in a variable. Then say the perimeter of the triangle with those three side lengths
2. Add code to your program to check whether or not the three side lengths can form a real triangle. Remember that, in any real triangle, the sum of the lengths of any two sides is greater than the length of the third side. So, if the triangle has side lengths aa , bb , and cc , then all of the following must be true:
If the sides given cannot make a real triangle, say so instead of saying the perimeter.
What kind of triangle?
1. Add code to your program to determine and say whether or not the triangle described is a right triangle. If the triangle has side lengths aa , bb , and cc , then the triangle is a right triangle if the following is true
2. Add code to your program to determine which type of triangle has the side lengths given. A triangle can be one of the following three types:
Triangle type Description
Equilateral All three side lengths equal
Isosceles Two side lengths equal, one different
Scalene All three side lengths different
I need help with lab 2.5 on snap Berkeley.
2. Add code to your program to check whether or not the three side lengths can form a real triangle. Remember that, in any real triangle, the sum of the lengths of any two sides is greater than the length of the third side. So, if the triangle has side lengths aa , bb , and cc , then all of the following must be true:
If the sides given cannot make a real triangle, say so instead of saying the perimeter.
What kind of triangle?
1. Add code to your program to determine and say whether or not the triangle described is a right triangle. If the triangle has side lengths aa , bb , and cc , then the triangle is a right triangle if the following is true
2. Add code to your program to determine which type of triangle has the side lengths given. A triangle can be one of the following three types:
Triangle type Description
Equilateral All three side lengths equal
Isosceles Two side lengths equal, one different
Scalene All three side lengths different
I need help with lab 2.5 on snap Berkeley.
- deck26
-
Scratcher
1000+ posts
help with snap program
That all sounds straightforward so what do you have problems with? Remember we're not here to do assignment work for people so only expect general hints.
So - do you know how to ask for a value and store it in a variable? If not there must be simple examples of such code available to you. Do that 3 times.
In fact this is all just basic handling of variables and comparing values so I would encourage you to do as much as you can before asking for more detailed help. Otherwise it does feel like you want us to do all the work.
So - do you know how to ask for a value and store it in a variable? If not there must be simple examples of such code available to you. Do that 3 times.
In fact this is all just basic handling of variables and comparing values so I would encourage you to do as much as you can before asking for more detailed help. Otherwise it does feel like you want us to do all the work.
- glxbl
-
New Scratcher
11 posts
help with snap program
That all sounds straightforward so what do you have problems with? Remember we're not here to do assignment work for people so only expect general hints.
So - do you know how to ask for a value and store it in a variable? If not there must be simple examples of such code available to you. Do that 3 times.
In fact this is all just basic handling of variables and comparing values so I would encourage you to do as much as you can before asking for more detailed help. Otherwise it does feel like you want us to do all the work.
I just posted it all so you guys would know what I'm doing, I am not smart with this stuff. I am litterly stuck on the first and second part. I could maybe manage to figure it out if I can get that.
- deck26
-
Scratcher
1000+ posts
help with snap program
There must be built in help or an online manual or something. In Scratch you'd use the ask block and then set your variable to the answer block but snap may differ. In your case you'd do that 3 times with different variables.
To add 3 vars in Scratch
ask [first side] and wait
set [a v] to (answer)
To add 3 vars in Scratch
set [total v] to ((a) + ((b) + (c))If you're that stuck you need to speak to your teacher/supervisor or whoever.
- glxbl
-
New Scratcher
11 posts
help with snap program
There must be built in help or an online manual or something. In Scratch you'd use the ask block and then set your variable to the answer block but snap may differ. In your case you'd do that 3 times with different variables.ask [first side] and wait
set [a v] to (answer)
To add 3 vars in Scratchset [total v] to ((a) + ((b) + (c))If you're that stuck you need to speak to your teacher/supervisor or whoever.
I do not see the last orange variable set block. I am on snap Berkeley program
EDIT: nevermind I figured it out for that block
Last edited by glxbl (Oct. 10, 2017 16:37:00)
- glxbl
-
New Scratcher
11 posts
help with snap program
alright, I got those 3 blocks in. do I have to ask second side and third side too? and how would I order it?
- deck26
-
Scratcher
1000+ posts
help with snap program
Sorry but at the moment it feels you're not really doing anything and I'm not going to do your assignment for you bit by bit. At the end of the day that does you no favours.
- Despicable_Dad
-
Scratcher
500+ posts
help with snap program
Parts 1 and 2 here: https://www.dropbox.com/s/3opg7svt431nbws/triangle.xml?dl=0
- glxbl
-
New Scratcher
11 posts
help with snap program
Parts 1 and 2 here: https://www.dropbox.com/s/3opg7svt431nbws/triangle.xml?dl=0
I cant seem to open it up. Is this link right
- glxbl
-
New Scratcher
11 posts
help with snap program
despicable dad. I figured out how to open it. thanks!
- RokCoder
-
Scratcher
1000+ posts
help with snap program
If you're so stuck that you don't know where to start with these tasks, you should probably speak with your teacher so they can guide you in the right direction. Asking people here to do everything for you is going to teach you absolutely nothing.
- deck26
-
Scratcher
1000+ posts
help with snap program
If you're so stuck that you don't know where to start with these tasks, you should probably speak with your teacher so they can guide you in the right direction. Asking people here to do everything for you is going to teach you absolutely nothing.Pretty much my point!
- Discussion Forums
- » Help with Scripts
-
» help with snap program




