av Joshua Smith för 5 årar sedan
122
Mer av detta
change the program to display a random text message from a list of possible answers
program the microbit to choose and display a random number when a button is pressed
select different images and messages when code is running
scroll through text messages
show images that match your current mood
make the heartbeat speed adjustable using the microbit buttons
A = slower B =faster
make code loop forever
code an animated heartbeat
display.image(HEART) sleep (1000) display.image(small.heart) sleep (1000) if_button.a_was_pressed()
program push-button to make a fast click game
crunch some numbers with a micro-calculator
display text message strings
change the animation speed of the images
show a sequence of images on the display
from microbit import * display.show(Image.SQUARE)
what is a microbit?
static electricity
senosors and buttons and an LED display for output
edge connector
a powerful embedded computer
To repeat code when the number of times to repeat is unknown
!=
To have Tracy make decisions based on conditional statements
if count > 0: pendown()
tailor functions to be used in multiple situations
many times
radius = int(input(“What is the radius?: “))
Store information to use in our code
Separating a large problems into smaller ones
Writing code for one part of a function before tackling the whole thing
breaks large code into functions
Breaking the problem down into smaller parts
begin_fill() circle(20) end_fill()
color must be in quation marks
three_circles()
A function name and commands to be performed
one command
make_sqaure
draw_square
# used in the beginning of a comment
""" for a multi-line comment
allowing humans to read and understand
right(180)
setposition()
speed 0
write the same code with fewer lines
makes code easier to read
for i in range ()
pendown commands
(0,0)
east
diameter when coding
200 pixels from starting point
left or right commands
forward (-100)
forward (100)
CC BY-SA this license lets people build,"remix" and tweak an artists work
CC BY-NC-ND is the most restrictive liscense because it only allows people to download and share your work as long as they credit you
CC BY-NC this license lets people build, tweak and remix on an artists work for non-commercial us
CC BY is the least restrictive, it allows people to distribute, remix, tweak, and build upon work even for commerical use.
Select add a file and name it anything.html
Right click anywhere on the page and select "inspector"
- line break,
Nesting lists:
Nesting lists:
Nesting lists:
In your style sheet write both: padding: 15px; and margin: 0px 30px 50px 15px;
#seong:hover::after{ background-color:red; content: "You have made a good decision"; this means that when you hover over the image a red text will appear and say you have made a good descision
use these for interactive images
can make a class interactive
Visibility: hidden, visible
Opacity: 01
Display: block, none inline
used to group and style inline elements
group a block of elements together to format them with CSS
to efficiently apply the same style severak different elemnts
if you go to youtube or twitter and click share the iframe comes up and you copy and past it into your code