Comp science princples Flashcards
learn what it is
What is a Algorithm?
An algorithm is a set of clear steps to complete a task. It can be written in different ways, like natural language, pseudocode, or flowcharts. Algorithms are important because they tell computers and programs what to do with data.
what command makes turtle move forward?
painter.forward(d)
what command makes turtle move backward?
painter.backward(d)
what command makes turtle move right?
painter.right(a)
what command makes turtle move left?
painter.left(a)
what command makes turtle draw a circle?
painter.circle(r)
what command makes turtle move anywhere in the x,y coordinates?
painter.goto(x,y)
what command Sets the direction the turtle is facing to a give value h, where h is a value between 0 and 360?
painter.setheading(h)
what command Changes the color of the drawing pen where c is the name of a color such as “red”, “blue”, and “yellow.”?
painter.pencolor(c)
what command Places the pen back on the canvas so you can resume drawing (note there is no parameter/value for this method)?
painter.pendown()
what command Lifts the pen off the canvas so you can then move the turtle to another position without making a line on the canvas (note there is no parameter/value for this method)?
painter.penup()
what command Set the pen size to s?
painter.pensize(s)
what command Set the size of the turtle to s?
painter.turtlesize(s)
What does user input mean?
User input in computer science refers to any data or information that a user provides to a computer or program. This input can be given through various devices like a keyboard, mouse, touch screen, or voice commands, and it allows the user to interact with the system or influence its behavior.
ex:user_name = input(“What is your name?”)
print(“Hello”, user_name, “welcome to my program.”)
What is a advance way you can make a circle?
painter.forward(30)
painter.right(20)