elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Temas
Páginas: 1 [2]
11  Programación / Scripting / ayuda me sale error en la linea 10 pygame en: 7 Agosto 2017, 04:31 am
Código
  1. import pygame,sys
  2. from pygame.locals import *
  3.  
  4. pygame.init()
  5. venta = pygame.display.set_mode((400,300))
  6. pygame.display.set_caption("Juego Beta")
  7.  
  8. while True:
  9.    for envento in pygame.event.get():
  10.     if venta.type == QUIT:
  11.     pygame.quit()
  12.     sys.exit()
  13.  
  14. pygame.display.update
12  Programación / Scripting / ayuda con mi programa! sale error en los elif en: 5 Agosto 2017, 23:05 pm
Código
  1. suma = "suma"
  2. resta = "resta"
  3. multiplicacion = "multiplicacion"
  4. division ="division"
  5.  
  6. respuesta=input("si quiere sumar inserte suma,para dividir inserte division,para restar inserte resta,para multiplicar inserte multiplicacion: ")
  7. #resta
  8. if resta == respuesta:
  9. c = int(input())
  10. d = int(input())
  11. print (c-d)
  12.  
  13. elif suma == respuesta:
  14. a = int(input())
  15. b = int(input())
  16. print (a+b)
  17.  
  18. elif division == respuesta:
  19. e = int(input())
  20. f = int(input())
  21. print (e/f)
  22.  
  23. elif multiplicacion == respuesta:
  24. g = int(input())
  25. h = int(input())
  26.  
  27. print (g*h)
  28.  
  29.  


· Los códigos deben ir en etiquetas GeSHi
· Los asuntos deben ser puestos en el respectivo subforo
· Si no aclaras el lenguaje no ayudas!
· No haga doble post (el tema duplicado fue borrado)
>aquí las reglas del foro
-Engel Lex
Páginas: 1 [2]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines