- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hi everyone. I am just learning Python on class so I am really at the basic. I need to write a python program that will flip a coin 100 times and then tell how many times tails and heads were flipped. This is what I have so far but I … |
|
Python beginner try to learn pygame. Here is a program I made for random color circles popping out. [CODE]import pygame, random pygame.init() X = 680 Y = 460 def main(): screen = pygame.display.set_mode((X,Y)) pygame.display.set_caption('circles') background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(pygame.color.Color('white')) run = True clock = pygame.time.Clock() while run: clock.tick(30) … |
|
[CODE]import pygame pygame.init() def main(): screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption('game') background = pygame.Surface(screen.get_size()) background = background.convert() background.fill(pygame.color.Color('yellow')) box = pygame.Surface((100,100)) box = box.convert() box.fill(pygame.color.Color('red')) t = True clock = pygame.time.Clock() while t: for event in pygame.event.get(): if event.type == pygame.QUIT: t = False elif event.type == pygame.MOUSEBUTTONDOWN: posi = pygame.mouse.get_pos() … |
|
I tried really hard on this one, finally came up with this, however, there's space between every number in my result because of the code 'print xxx,' , I want to find a way to delete those spaces. Program: let user enter say 555-GET-FOOD, convert it to 555-438-3663 [CODE]alph = … |