2018-02-05 HW

posted Feb 4, 2018, 12:32 PM by Konstantinovich Samuel   [ updated Feb 5, 2018, 6:39 AM ]
Goal: Function in python

If you have not shared your Codingbat with me, please do so in your preferences: konstans@stuy.edu


Variable and function names in python:
    1. Start with a letter or underscore
    2. The rest of the characters can be letters, numbers, and underscores.
      OneFish
      blueKitten
      _what_
      x2
      c3p0
      y_u_so_n00b



-Testing code is important, codingbat does it for you. Try testing your code in IDLE, by using the test cases that codingbat provides. Keep your IDLE window open, and your test cases displayed. You can always test more problems later! (You will be more likely to do this if you have IDLE running and ready)

-These codingbat problems are easy enough to write in the codingbat window. This does not give you all the features of IDLE, so if you don't get the right answer, you can get better error messages and parenthesis matching in IDLE.
To find the custom problems that I assign here is the link:

Classwork warmup:
1 square 
2 negate 
3 funkyCalc 
4 distance 

Boolean functions generally do NOT need an if statement! Just write an EXPRESSION that uses and/or/comparisons!
5 isBig
6 isEven


Discussion about possible solutions...






HOMEWORK CODINGBAT: 
ftoc 
ctof 
evalQuadratic
pos_neg
near_hundred
sleep_in

Comments