Just finished the section on using builtins. I fudged a little as in Python I used string slicing instead of a substring function as in Java. This is kind of a cool feature in Python array handling. For example to pickup the first character in a person's name in Java I used
String empEMail = empFName.substring(0,1);
Whereas in Python the code was
empEMail = empFName[:1]
Which means everything before the character at index 1.
Click on the image below to see an expanded view of the three columns on box.com with pseudocode, Java and Python.
Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts
Monday, April 10, 2017
Friday, April 7, 2017
Methods in Java and functions in Python
We were bound to hit a few bumps in the road in developing our Python class using the Java manual as an outline. We are at the start of chapter three. There are five chapters in all. At this point the Java manual discusses using methods. Since we have not yet gotten to classes (which aren't formally discussed until chapter 4) we are substituting functions in our Python material at this point. We can discuss methods later when we get to chapter four. Below is the thumbnail of the three column (pseudocode, java, python) screenshot on box.com.
Subscribe to:
Posts (Atom)

