Python for Kids by Jason R. Briggs
Author:Jason R. Briggs [Jason R. Briggs]
Language: eng
Format: epub, mobi, pdf
Tags: JUVENILE NONFICTION / Computers / Programming
ISBN: 9781593274948
Publisher: No Starch Press
Published: 2012-11-17T16:00:00+00:00
When you select a color and click OK, a tuple will be displayed. This tuple contains another tuple with three numbers and a string:
>>> colorchooser.askcolor() ((235.91796875, 86.3359375, 153.59765625), '#eb5699')
The three numbers represent the amounts of red, green, and blue. In tkinter, the amount of each primary color to use in a color combination is represented by a number between 0 and 255 (which is different from using a percentage for each primary color with the turtle module). The string in the tuple contains the hexadecimal version of those three numbers.
You can either copy and paste the string value to use or store the tuple as a variable, and then use the index position of the hexadecimal value.
Let’s use the random_rectangle function to see how this works.
>>> c = colorchooser.askcolor() >>> random_rectangle(400, 400, c[1])
Here’s the result:
Download
Python for Kids by Jason R. Briggs.mobi
Python for Kids by Jason R. Briggs.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Art of Coaching Workbook by Elena Aguilar(48620)
Trainspotting by Irvine Welsh(20161)
Twilight of the Idols With the Antichrist and Ecce Homo by Friedrich Nietzsche(17766)
Fangirl by Rainbow Rowell(7909)
Periodization Training for Sports by Tudor Bompa(7390)
Change Your Questions, Change Your Life by Marilee Adams(6715)
This Is How You Lose Her by Junot Diaz(5857)
Grit by Angela Duckworth(4792)
Red Sparrow by Jason Matthews(4743)
Asking the Right Questions: A Guide to Critical Thinking by M. Neil Browne & Stuart M. Keeley(4653)
Paper Towns by Green John(4220)
Room 212 by Kate Stewart(4166)
Ken Follett - World without end by Ken Follett(4014)
The Sports Rules Book by Human Kinetics(3640)
Housekeeping by Marilynne Robinson(3474)
The Motorcycle Diaries by Ernesto Che Guevara(3389)
Papillon (English) by Henri Charrière(3342)
Exercise Technique Manual for Resistance Training by National Strength & Conditioning Association(3341)
Introduction to Kinesiology by Shirl J. Hoffman(3337)
![](/ebook_detail_files/space.gif)