Skip to content

Instantly share code, notes, and snippets.

@SpaceVoyager
Created June 6, 2015 19:54
Show Gist options
  • Select an option

  • Save SpaceVoyager/9de54d26a258434c3a49 to your computer and use it in GitHub Desktop.

Select an option

Save SpaceVoyager/9de54d26a258434c3a49 to your computer and use it in GitHub Desktop.
hello.py
# An more interesting Pyhthonista 'Hello World' program
# Written by Yuhang Wang for A2PyKids
import console
import canvas
from random import random
import speech
# Ask for your name and then write it in random color on screen
canvas.set_size(1000, 600)
canvas.set_fill_color(random(), random(), random())
input = console.input_alert('What is your name?')
text = 'Hello, ' + input + '!'
size = 100
fnt = 'Helvetica-Bold'
canvas.draw_text(text, 10, 200, fnt, size)
# Also let Siri speak it out
speech.say(text, 'en-US', 0.3)
@Raze369
Copy link

Raze369 commented Jun 7, 2015

We are awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment