Entradas

Mostrando entradas de marzo, 2020

Programa Python Poligonos

Imagen
# -*- coding: utf-8 -*- from Tkinter import * def funcion (seleccion , figura): vs = Toplevel() vs.configure( bg = "black" ) vs.title(figura) if seleccion == 2 : panel = Canvas(vs , width = 250 , height = 500 , bg = 'gray' ) panel.pack() panel.create_polygon( 6 , 126 , 22 , 122 , 82 , 124 , 82 , 324 , 14 , 330 , 6 , 318 , width = 1 , fill = "#080008" ) panel.create_polygon( 186 , 146 , 232 , 146 , 232 , 312 , 188 , 314 , width = 1 , fill = "#2a0027" ) panel.create_polygon( 62 , 442 , 77 , 415 , 98 , 414 , 98 , 369 , 115 , 368 , 115 , 310 , 165 , 309 , 165 , 362 , 180 , 360 , 187 , 401 , 185 , 441 , 88 , 457 , width = 1 , fill = "#080008" ) panel.create_polygon( 63 , 470 , 63 , 442 , 88 , 457 , 185 , 441 , 185 , 468 , 88 , 485 , width = 1 , fill = "#2a0027" ) ...

Programas Python En Clase

Imagen
Programa Mostrar Hola Mundo con For for i in "Hola mundo" : print (i) Programa Mostrar Números del 1 al 100 i= 1 while (i<= 100 ): print (i) i += 1 print ( "fin de bucle" ) Programa Mostrar Rango de Números ##!/usr/bin/python3 rango = list ( range ( 5 , 11 )) print (rango) Programa decimal a binario print ( "programa de conversion de decimal a binario" ) print ( "ingrese el valor a convertir===>" ) a= int ( input ( "" )) b= bin (a) print (b) Programa de suma básica import time print ( "Ingrese un numero:" ) a= int ( input ( "" )) print ( "Ingrese un segundo numero:" ) b= int ( input ( "" )) suma=a+b print ( "Suma de valores ingresados" ) print (suma) Programa rango Hola #!/usr/bin/python3 rango = list ( range ( 0 , input ( "Hola mundo...