This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Todo buen lenguaje de programación provee de al menos: | |
- Expresiones primitivas. | |
- Formas de combinar. | |
- Formas de abstraer. | |
A continuación vemos cómo se da eso en Python | |
""" | |
# --> Expresiones primitivas: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Bio.Seq import Seq | |
# Create sequence object | |
my_sequence = Seq("AGTACACTGGT") | |
# Show the sequence object | |
print("Sequence:", my_sequence) | |
# The sequence was created with a generic alphabet. | |
# The alphabet tells us whether it is a DNA, RNA or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import everything in the p5.py library | |
from p5 import * | |
def draw(): | |
# On each frame... | |
if mouse_is_pressed: | |
fill(100) # Fill color gray | |
else: | |
fill(255) # Fill color white | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the turtle graphics module | |
import turtle | |
# Create a new turtle with the | |
# Turtle function of the turtle module | |
t = turtle.Turtle() | |
# 100 times... | |
for x in range(100): | |
t.forward(x) # Move forward x steps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First program in Python! | |
print("Hello world!") |
NewerOlder