ShmoopTube

Where Monty Python meets your 10th grade teacher.

Search Thousands of Shmoop Videos


AP Computer Science Videos 110 videos

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

See All

AP Computer Science 1.3 Review of the Basics 187 Views


Share It!


Description:

E.T., phone home....or solve this Shmoopy AP Computer Science question.

Language:
English Language

Transcript

00:00

Thank you We sneak and here's your shmoop du jour

00:05

Brought to you by mall kiosks Whether you need a

00:08

license plate frame black light poster or misspelled custom mug

00:12

you can find everything you need here in mall kiosks

00:16

All right well it is lost in this program Where

00:19

should we put system out Print blind e t phone

00:23

home If we want output to show off the program

00:26

made it into the four loop and successfully exited the

00:29

loop here Your potential answers Posy Let's go Okay so

00:35

sounds like we're being asked where do concert up front

00:38

line statement to make sure our loops are working properly

00:41

How to make visualizing the situation a little easier Let's

00:44

insert some pseudo code where it says implementation not shown

00:49

just to give us something to work with Well pseudo

00:53

code isn't real code And if you tried running it

00:56

your compiler would have a fit it's just for our

00:58

purposes Let's say this if statement is if alien hungry

01:03

equals true well a true result will take us into

01:07

the code within the if statement there we'll find a

01:10

four loop which will set up to run ten times

01:14

Will initialize the imager eyes are counter with a value

01:17

of zero Terminate the loop when eyes less than ten

01:20

becomes false and increase the value i buy one each

01:24

time the loop runs So if alien hungry is true

01:29

we'll move on to the four loop during which we'll

01:32

call the function alien candy eat so the four loop

01:35

should run ten times then termination All right so let's

01:39

move on to the question Where should we insert print

01:41

line statement so we can confirm that we've entered the

01:44

four loop and successfully exit All right Well line two

01:48

is a definite it's right there inside the four loop

01:51

itself And that print line will occur every time the

01:54

four loop cycles flying three would also be a good

01:57

idea It's situated directly after for the four loop so

02:01

it'll run once that luke has ended It's also still

02:04

nested inside the if statement the line one is also

02:07

inside if statement but it would print before the four

02:10

loop runs which doesn't help us at all to know

02:13

whether or not the four loop is successful It sounds

02:16

like our answer is e flying two and three and

02:18

thanks for all your help E t Oh and uh 00:02:21.635 --> [endTime] thanks karl Oh

Related Videos

AP Computer Science 1.2 GridWorld Case Study and APIs
493 Views

AP Computer Science 1.2 GridWorld Case Study and APIs. What is the direction of the actor?

AP Computer Science 1.4 Standard Algorithms
200 Views

AP Computer Science 1.4 Standard Algorithms. How many times will mystery be called for mystery(n) for n > 1?

AP Computer Science 2.3 Classes and Objects
191 Views

AP Computer Science 2.3 Classes and Objects. Which of the following is correct implementation of the Country class?

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism
204 Views

AP Computer Science 3.4 Inheritance, Abstraction, and Polymorphism. Which of the following will satisfy the conditional if statement for boo, str,...

AP Computer Science 4.2 Standard Algorithms
191 Views

AP Computer Science 4.2 Standard Algorithms. What kind of algorithm is the following?