![]() |
![]() |
|
home—info—lects—labs—exams—hws
—D2L—breeze (snow day)—tutor/PIs
Edit, as mentioned in class:If you want to work at home, and have questions/problems downloading JES, and/or connecting to your H: drive from off-campus, you can ask on the D2L Discussion Board (under the topic “tools”).
- Due Feb.03 (Mon.) 17:30.
- Submit your file hw01.py on D2L, and turn in a hardcopy of this homework (under my office door, if you don't bring it to class).
You can't open your file by double-clicking; you have to first open JES, and then choose File > Open&hellilp;.
For this homework, type your answers in the top half of JES, and save to a file hw01.py. Your file should start with your name/info, and include one additional function for this homework:
# your name # ITEC109 hw01 -- see http://www.radford.edu/~itec109/2014spring-ibarland/Homeworks/hw01.html # We will use some string-library functions for this hw: import string # A helper function, for this homework: # # substring -- given a string, a start-index, and a stop-index, # return the characters from start-index up to (but not including) stop-index. # Indices are 0-based. # Examples: substring( "radford", 3, 6) = "for" # substring( "radford", 0, 3) = "rad" # def substring(str,a,b): return str[a:b] |
Coming soon: A list of all the functions we've talked about in class.
function | example | input type(s) | return-type |
, | |||
, |
# 2f: 2+3 # 2g: 4*(5+6) |
hint:Use the functionmax .
Give a python expression to calculate each of the following.
Give just the expression, not the answer. Your answer should
include only the data in the problem, the four basic arithmetic operators
(
hint:Remember our friendmax .
Note:Your answer will mention the string"abracadabra!" twice.
hint:max has a friend namedmin .
home—info—lects—labs—exams—hws
—D2L—breeze (snow day)—tutor/PIs
©2014, Ian Barland, Radford University Last modified 2014.Feb.10 (Mon) |
Please mail any suggestions (incl. typos, broken links) to ibarland ![]() |
![]() |