CSC 127A Lecture 8: Week 3 9.9.16

16 views3 pages

Document Summary

100 for x and 50 for y: p. canvas. create_rectangle(x + size / 10 * 7, y + size / 10, x + size, y + size / 10 * 3, fill=cyan, width=0, main() Note* make sure you hit enter to continue your string on the next line, they cannot go over 100 characters. Drawing panel must be in the same file as python to be able to import. However, math import is built into python and nothing extra is needed to be downloaded. It is necessary to use from math import * to use the specific math functions listed in the slides. Simply calling a python math function does not produce a visible result, to produce a visible output you must turn it into a variable: from math import , def main(), result = floor(7. 1, print(result, main() The math functions min and max can be used to bound numbers. For example with an age, no one can be 3.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents