Jump to content

Super Simple Scratch Question

Go to solution Solved by Ithanul,

In the case of that question, yes it is both.  If statements are a selection/decision statement, but they most go in sequence of their internal steps.  Since a move 10 steps is after the selection statement, the next sequence is the move 10 steps after the selection statement has run its part.

 

You can have code with selection/decision and loops, but you can't have code without sequence (For the basic coding, not sure if there is code out there that breaks that rule).

11 minutes ago, SneakySquid9 said:

In scratch can there be a situation where a script can be both selection and sequence?

this is extremely vague

OFF TOPIC: I suggest every poll from now on to have "**CK EA" option instead of "Other"

Link to post
Share on other sites

Yea lol for example when there is an “if” block (random blocks inside doesn’t matter) and after it there’s a move 10 steps, would that count as selection or selection and sequence?

 

(btw I am DEFINITELY NOT an expert by any means. I am taking Computer Science 1 and have NO real knowledge with coding so bear with me but hey, everyone has to start somewhere)

Link to post
Share on other sites

In the case of that question, yes it is both.  If statements are a selection/decision statement, but they most go in sequence of their internal steps.  Since a move 10 steps is after the selection statement, the next sequence is the move 10 steps after the selection statement has run its part.

 

You can have code with selection/decision and loops, but you can't have code without sequence (For the basic coding, not sure if there is code out there that breaks that rule).

2023 BOINC Pentathlon Event

F@H & BOINC Installation on Linux Guide

My CPU Army: 5800X, E5-2670V3, 1950X, 5960X J Batch, 10750H *lappy

My GPU Army:3080Ti, 960 FTW @ 1551MHz, RTX 2070 Max-Q *lappy

My Console Brigade: Gamecube, Wii, Wii U, Switch, PS2 Fatty, Xbox One S, Xbox One X

My Tablet Squad: iPad Air 5th Gen, Samsung Tab S, Nexus 7 (1st gen)

3D Printer Unit: Prusa MK3S, Prusa Mini, EPAX E10

VR Headset: Quest 2

 

Hardware lost to Kevdog's Law of Folding

OG Titan, 5960X, ThermalTake BlackWidow 850 Watt PSU

Link to post
Share on other sites

LoL, trying to do your homework?

CPU: Ryzen 9 5900 Cooler: EVGA CLC280 Motherboard: Gigabyte B550i Pro AX RAM: Kingston Hyper X 32GB 3200mhz

Storage: WD 750 SE 500GB, WD 730 SE 1TB GPU: Gigabyte GTX 1050 PSU: Corsair SF750 Case: Streacom DA2

Monitor: LG 27GL83B Mouse: Razer Basilisk V2 Keyboard: G.Skill KM780 Cherry MX Red Speakers: Mackie CR5BT

 

MiniPC - Sold for $100 Profit

Spoiler

CPU: Intel i3 4160 Cooler: Integrated Motherboard: Integrated

RAM: G.Skill RipJaws 16GB DDR3 Storage: Transcend MSA370 128GB GPU: Intel 4400 Graphics

PSU: Integrated Case: Shuttle XPC Slim

Monitor: LG 29WK500 Mouse: G.Skill MX780 Keyboard: G.Skill KM780 Cherry MX Red

 

Budget Rig 1 - Sold For $750 Profit

Spoiler

CPU: Intel i5 7600k Cooler: CryOrig H7 Motherboard: MSI Z270 M5

RAM: Crucial LPX 16GB DDR4 Storage: Intel S3510 800GB GPU: Nvidia GTX 980

PSU: Corsair CX650M Case: EVGA DG73

Monitor: LG 29WK500 Mouse: G.Skill MX780 Keyboard: G.Skill KM780 Cherry MX Red

 

OG Gaming Rig - Gone

Spoiler

 

CPU: Intel i5 4690k Cooler: Corsair H100i V2 Motherboard: MSI Z97i AC ITX

RAM: Crucial Ballistix 16GB DDR3 Storage: Kingston Fury 240GB GPU: Asus Strix GTX 970

PSU: Thermaltake TR2 Case: Phanteks Enthoo Evolv ITX

Monitor: Dell P2214H x2 Mouse: Logitech MX Master Keyboard: G.Skill KM780 Cherry MX Red

 

 

Link to post
Share on other sites

7 minutes ago, Ithanul said:

In the case of that question, yes it is both.  If statements are a selection/decision statement, but they most go in sequence of their internal steps.  Since a move 10 steps is after the selection statement, the next sequence is the move 10 steps after the selection statement has run its part.

 

You can have code with selection/decision and loops, but you can't have code without sequence.

Thanks so much

And also anything with a loop counts as iteration right?

Link to post
Share on other sites

4 minutes ago, SneakySquid9 said:

Studying for a test so I guess that counts ?

What code are you learning? 

I took a bit of basic Visual Basic and C++ for my CS degree.

Best thing to do is do some simple programs and get the feel for doing code.  Once you get a basic understanding of the fundamentals, the basics do help when looking at other programming languages.

2023 BOINC Pentathlon Event

F@H & BOINC Installation on Linux Guide

My CPU Army: 5800X, E5-2670V3, 1950X, 5960X J Batch, 10750H *lappy

My GPU Army:3080Ti, 960 FTW @ 1551MHz, RTX 2070 Max-Q *lappy

My Console Brigade: Gamecube, Wii, Wii U, Switch, PS2 Fatty, Xbox One S, Xbox One X

My Tablet Squad: iPad Air 5th Gen, Samsung Tab S, Nexus 7 (1st gen)

3D Printer Unit: Prusa MK3S, Prusa Mini, EPAX E10

VR Headset: Quest 2

 

Hardware lost to Kevdog's Law of Folding

OG Titan, 5960X, ThermalTake BlackWidow 850 Watt PSU

Link to post
Share on other sites

2 minutes ago, Ithanul said:

What code are you learning?  I took a bit of basic Visual Basic and C++ for my CS degree.

Best thing to do is do some simple programs and get the feel for doing code.  Once you get a basic understanding of the fundamentals, the basics do help when looking at other programming code.

For now we are just learning scratch but in the future I think our teacher is going to get into java and c++ (btw this course is in high school)

 

and also anything with a loop counts as iteration right?

Link to post
Share on other sites

-moved to programming-

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to post
Share on other sites

7 minutes ago, SneakySquid9 said:

For now we are just learning scratch but in the future I think our teacher is going to get into java and c++ (btw this course is in high school)

 

and also anything with a loop counts as iteration right?

Ah, so you doing the thought out process part of the learning.  Word of advice when you get to the coding, figure out if flow charts or IPO charts work for you, or you can use both.  It takes a little extra work to do those, but when troubleshooting your code it helps out a lot.

 

Hmmm, I can't remember right at the moment.  Been a bit since I did my coding classes. (Plus, at the end of my 12 hour shift and its bed time for me)

2023 BOINC Pentathlon Event

F@H & BOINC Installation on Linux Guide

My CPU Army: 5800X, E5-2670V3, 1950X, 5960X J Batch, 10750H *lappy

My GPU Army:3080Ti, 960 FTW @ 1551MHz, RTX 2070 Max-Q *lappy

My Console Brigade: Gamecube, Wii, Wii U, Switch, PS2 Fatty, Xbox One S, Xbox One X

My Tablet Squad: iPad Air 5th Gen, Samsung Tab S, Nexus 7 (1st gen)

3D Printer Unit: Prusa MK3S, Prusa Mini, EPAX E10

VR Headset: Quest 2

 

Hardware lost to Kevdog's Law of Folding

OG Titan, 5960X, ThermalTake BlackWidow 850 Watt PSU

Link to post
Share on other sites

1 minute ago, Ithanul said:

Ah, so you doing the thought out process part of the learning.  Word of advice when you get to the coding, figure out if flow charts or IPO charts work for you, or you can use both.  It takes a little extra work to do those, but when troubleshooting your code it helps out a lot.

 

Hmmm, I can't remember right at the moment.  Been a bit since I did my coding classes.

I will keep that in mind and thank you for your help!

Link to post
Share on other sites

On 9/24/2017 at 8:56 PM, Ithanul said:

Ah, so you doing the thought out process part of the learning.  Word of advice when you get to the coding, figure out if flow charts or IPO charts work for you, or you can use both.  It takes a little extra work to do those, but when troubleshooting your code it helps out a lot.

-snip-

Yeah, unless you've been programming for a long time and have learned to navigate through a metaphorical flowchart for the code in your head (Which took me a several years to develop the ability to do), flowcharts can be very helpful when working out code.

 

On 9/24/2017 at 8:49 PM, SneakySquid9 said:

-snip-

 

and also anything with a loop counts as iteration right?

Loops can count as iteration but only if the loop does something like increase the value of a variable by 1 each time it recurses.

 

This is an iterating loop:

screenshot_15.png.bd05b5ba8ccae9dce2b2869d2cb9cb11.png

 

And this is not:

screenshot_16.png.15bbd6d60b91dac2645d77181c4a8d1f.png

My procrastination is the bane of my existence.

I make games and stuff in my spare time.

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×