-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trabajando con funciones
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
name = str(input("Cual es tu nombre? ")) | ||
|
||
edad = int(input(("Cual es tu edad?"))) | ||
print ("hola "+ name+" !, tu edad es: "+ str(edad)) | ||
|
||
|
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
import turtle | ||
def main(): | ||
window = turtle.Screen() | ||
t = turtle.Turtle() | ||
make_square(t) | ||
turtle.mainloop() | ||
|
||
|
||
def make_square(t): | ||
length = int(input("Tamaño:")) | ||
|
||
for i in range(3): | ||
make_line_and_turn(t,length) | ||
|
||
make_line_and_turn(t,length) | ||
|
||
def make_line_and_turn(t,length): | ||
t.forward(length) | ||
t.left(90) | ||
|
||
if __name__ == '__main__': | ||
main() |