↓ 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

Category: computer science

Python: carriage return

By Jack Posted on February 19, 2023 Posted in computer science

Self-tutoring about Python: the tutor mentions a curiosity. Experimenting with the print function on the Python interpreter, I noticed that print(‘hello\rain’) will yield ainlo The reason, I believe, is that \r is interpreted as the carriage return. As such, it …

Python: carriage return Read more »

Computer science: Python: user-defined constants

By Jack Posted on February 17, 2023 Posted in computer science

Self-tutoring about Python: the tutor mentions constants. To my knowledge, Python doesn’t have user-defined constants. However, there is a way to accomplish a similar impression: a namespace. A namespace, in this case, is a separate file wherein the constant is …

Computer science: Python: user-defined constants Read more »

Computer science: Python: let’s sort a list.

By Jack Posted on February 16, 2023 Posted in computer science

Self-tutoring about computer science: the tutor mentions the sort() method in Python. Python lists can be sorted using the_list.sort(). However, it might not work the way one would first think. the_list.sort() rewrites the_list in sorted order. However, it doesn’t return …

Computer science: Python: let’s sort a list. Read more »

Computer science: memoization

By Jack Posted on December 10, 2021 Posted in computer science

Tutoring computer science, terms arise. The tutor mentions memoization. Let’s imagine a function called F1. Let’s further imagine that F1 uses a lot of resources – calls to it take a lot of computation power. In such a situation, you …

Computer science: memoization Read more »

Comp sci: type parameter

By Jack Posted on December 7, 2021 Posted in computer science

Tutoring computer science, terms are important. The tutor mentions type parameter. The motivation for a type parameter is easiest to imagine with a strongly typed language like Java. Typically, such a language insists on knowing the type of an argument …

Comp sci: type parameter Read more »

Comp sci: static methods

By Jack Posted on November 30, 2021 Posted in computer science

Tutoring computer science, static methods can arise. The specific language does provide meaningful context in how a programmer perceives static methods. However, the general idea is that a static method can be invoked from the class itself rather than needing …

Comp sci: static methods Read more »

Comp Sci: code motion

By Jack Posted on November 24, 2021 Posted in computer science

Tutoring computer science, its own terms arise. The tutor mentions code motion. Code motion refers to evaluating a sentry value once, outside a loop, then storing the value in a variable which will be used for the test in the …

Comp Sci: code motion Read more »

Programming: newline in rhs expression: Python vs JavaScript

By Jack Posted on September 22, 2021 Posted in programming

Self-tutoring about programming: the tutor mentions a difference between Python and JavaScript he’s noticed. With Python, if you want to continue to the next line (perhaps for easier reading), it seems a backslash, then Return, will work: the_var= (3 + …

Programming: newline in rhs expression: Python vs JavaScript Read more »

Comp Sci: what is casting?

By Jack Posted on September 7, 2021 Posted in computer science

Tutoring comp sci, casting will come up: the tutor defines it. Casting, in computer science, means changing a variable’s type to a different one. Typically, the result will be stored in a new variable. An example where casting might be …

Comp Sci: what is casting? Read more »

Comp sci: regular expressions: newline in regex

By Jack Posted on September 5, 2021 Posted in PHP, regular expressions

Self-tutoring about regex: the tutor mentions the newline in a detection pattern. In PHP regex, \n means ‘newline’. Therefore, $pat=’/\n/’; will be found in a string containing a newline. Source: w3schools.com

Posts pagination

Previous 1 … 3 4 5 6 7 … 32 Next
Copyright © 2026 Oracle Tutoring, Campbell River, BC | Powered by Responsive Theme
Copyright © 2026 Oracle Tutoring, Campbell River, BC | Powered by Responsive Theme