↓ Skip to Main Content
Oracle Tutoring, Campbell River, BC (250) 203-6544 (text) or (250) 830-0295 (talk)

Main Navigation

  • english
  • math
  • lifestyle
  • blog home
  • website
Oracle Tutoring, Campbell River, BC (250) 203-6544 (text) or (250) 830-0295 (talk)

Off Canvas Menu

  • english
  • math
  • lifestyle
  • blog home
  • website

Tag: python

Comp sci: Python: class methods

By Jack Posted on November 6, 2024 Posted in computer science Tagged with classmethod decorator, decorators, python

Self-tutoring about Python coding: the tutor mentions an observation about Python class methods. A Python class method can be called by referencing its containing class name rather than an instance. Such a method might be called via classname.the_method(). However, it’s …

Comp sci: Python: class methods Read more »

Object-oriented programming: what does “.” do?

By Jack Posted on May 9, 2024 Posted in coding Tagged with dot operator, java, object-oriented programming, OOP, python

Tutoring coding, operators come up. The tutor mentions the dot. From a top-down point of view, the . (aka, dot) operator sets the context wherein you want to refer. Therefore, obj0.helloWorld(); means “I want to execute the method helloWord() that …

Object-oriented programming: what does “.” do? Read more »

Python: printing joined strings

By Jack Posted on August 5, 2015 Posted in computer science Tagged with python, python str operator, python string concatenation

The tutor brings up a couple of quick points about printing strings in Python. In computer science, concatenate is another way of saying join. In Python, it’s done with the “plus” sign: s0=”Hello.” s1=” How are you?” print(s0+s1) gives the …

Python: printing joined strings Read more »

Python: a string application

By Jack Posted on August 2, 2015 Posted in computer science Tagged with python, python string index, python strings

The tutor shows an example program centered around string indexing. In my July 31 post, I opened the topic of string indexing in Python. A string, moving forward, starts at position [0]; however, from the end, it starts at [-1]. …

Python: a string application Read more »

Python: string indexing

By Jack Posted on July 31, 2015 Posted in computer science Tagged with python, python negative string index, python string, python string index

The tutor gives a Python example of string indexing. In computer science, a string is a word which can include non-alphabetical characters. An example of a string is “desk17”. Let’s imagine creating the variable thestring with the value “desk17”, as …

Python: string indexing Read more »

Python: the power function

By Jack Posted on July 30, 2015 Posted in computer science Tagged with import math, math.pow, pow, python, python power function for other roots, python power function for rational exponents

The tutor focuses on Python’s pow(x,y) command. Back in my post on May 3, 2014 I pointed out that In the left expression above, c is the root while b is the exponent. Some might also call b the “power”. …

Python: the power function Read more »

Python: (lack of) punctuation

By Jack Posted on July 27, 2015 Posted in computer science Tagged with indentation, python, python loops

The tutor comments on a possibly surprising characteristic of Python. Unlike Perl or Java, Python doesn’t use semicolons at the end of statements. Furthermore, it doesn’t use braces around loops. A loop body is indicated by indentation: for i in …

Python: (lack of) punctuation Read more »

Python: a few comments about the print command

By Jack Posted on July 20, 2015 Posted in computer science Tagged with python, python 2.x vs 3.x, python end=" ", python print command

The tutor seeks to clarify some ideas about Python’s print command. I refreshed Python on one of my computers yesterday; I uninstalled Python 2.7, then installed Python 3.4 instead. To do so, I went to python.org. I was using a …

Python: a few comments about the print command Read more »

Python: a test script

By Jack Posted on July 15, 2015 Posted in computer science Tagged with python, python test script

The tutor offers a quick way to test the Python installation. If you’re running Linux, I’d guess Python is on-board. With Windows, Python likely needs to be installed. In either case, to test it, you can write a test script, …

Python: a test script Read more »

Computer Science: Python

By Jack Posted on July 14, 2015 Posted in computer science Tagged with python

The tutor starts about Python. I met the programming language Python about three years ago. It’s got the quick scriptiness of Perl, along with object-oriented capabilities. Furthermore, it’s applicable to small devices, like phones. Python’s got a great IDE: IDLE. …

Computer Science: Python Read more »

Copyright © 2026 Oracle Tutoring, Campbell River, BC | Powered by Responsive Theme
Copyright © 2026 Oracle Tutoring, Campbell River, BC | Powered by Responsive Theme