10° Primer periodo computers

Python divertido

# Welcome Project for Teachers


# First, we're going to introduce the concept of functions.

# Functions are like mini-programs inside a program that you can run whenever you need.

# On imagi Edu there are certain built-in functions that you can use in any program.


# The built-in function below, `scrolling_text()`, displays a scrolling text on a screen.

# We'll use it to show various welcome messages and examples.


# Let's start by welcoming you by your name:


# This is a variable. It's like a box where we can store data.

# Replace 'Teacher Name' with your first name.

teacher_name = "Jaime"


# This line will display your name in a welcome message.

scrolling_text(text="CMB , " + teacher_name + "! ",text_color=B, back_color=Y,duration=300 )


# Run your code.


# Congrats! You made your first edits and ran your first Python program!



# --------------------------------------------------------------------------------

# More fun for the curious ones:


# In programming, there's something called 'commenting'.

# It's a way for programmers to leave notes or temporarily disable parts of code.

# Anything after a # is a comment and is ignored by the computer.


# Below are some more examples of `scrolling_text()`.

# Uncomment them by removing the '#' to see them in action!


# Change the color of the text to red (`R`)

# `R` is a variable defined by the programming environment that holds the color red.

# scrolling_text(text="Warm and cool vibes!", text_color=R)


# Did you get an error message? That's great! Error messages are here to guide us.

# This one is saying that we can only have one scrolling text animation.

# So you need to comment out the first one in line 17.


# Green text (like a chalkboard) on a white background.

# scrolling_text(text="Class is in session. ", text_color=G, back_color=W,duration=30)


# Makes the text appear like it's taking its sweet time.

# scrolling_text(text="Slow and steady...", duration=300)


# Some repeated characters for fun visuals. Or could this be Morse Code..?

# scrolling_text(text="| .... . .-.. .-.. --- |")


# Feel free to play around with the text or the values of any of the other parameters.


# The `scrolling_text()` and all other built-in functions are introduced in-depth

# in the lesson materials and in the documentation.


# Welcome to the world of coding! We're thrilled to have you here.


# TEXTO 2


# First, we define our color variables using RGB color codes.

# These are in the format (R, G, B) where R = Red, G = Green, and B = Blue.

pink = (255, 170, 255)

blue = (100, 210, 240)

yellow = (250, 245, 120)

orange = (250, 165, 15)

green = (50, 225, 140)


# Now, let's color our matrix, `m`, using the colors we defined.


# Setting the top-left 2x2 square to yellow.

m[0][0] = yellow

m[0][1] = yellow

m[1][0] = yellow

m[1][1] = yellow


# Setting the top-center 2x2 square to green.

m[0][3] = green

m[0][4] = green

m[1][3] = green

m[1][4] = green


m[0][6] = blue

m[0][7] = blue

m[1][6] = blue

m[1][7] = blue


m[3][0] = blue

m[3][1] = blue

m[4][0] = blue

m[4][1] = blue


m[3][3] = pink

m[3][4] = pink

m[4][3] = pink

m[4][4] = pink


m[3][6] = orange

m[3][7] = orange

m[4][6] = orange

m[4][7] = orange


m[2][2] = orange




CMB 10°-students (1).pdf

m[0][0] = Y  # For each repetition, it colors a square in row 0

m[1][1] = Y  # For each repetition, it colors a square in row 0

m[2][2] = Y  # For each repetition, it colors a square in row 0

m[3][3] = Y  # For each repetition, it colors a square in row 0

m[4][4] = Y  # For each repetition, it colors a square in row 0

m[5][5] = Y  # For each repetition, it colors a square in row 0

m[6][6] = Y  # For each repetition, it colors a square in row 0m[0][0] = Y  # For each repetition, it colors a square in row 0

m[7][7] = Y  # For each repetition, it colors a square in row 0m[0][0] = Y  # For each repetition, it colors a square in row 0



m[0][7] = Y  # For each repetition, it colors a square in row 0

m[1][6] = Y  # For each repetition, it colors a square in row 0

m[2][5] = Y  # For each repetition, it colors a square in row 0

m[3][4] = Y  # For each repetition, it colors a square in row 0

m[4][3] = Y  # For each repetition, it colors a square in row 0

m[5][2] = Y  # For each repetition, it colors a square in row 0

m[6][1] = Y  # For each repetition, it colors a square in row 0m[0][0] = Y  # For each repetition, it colors a square in row 0

m[7][0] = Y  # For each repetition, it colors a square in row 0m[0][0] = Y  # For each repetition, it colors a square in row 0


Python escritura 

2° PERIODO