- Видео 387
- Просмотров 705 969
Logic Lambda
Добавлен 20 авг 2021
I am a software engineer and computer science educator.
Returning the Result of a Boolean Expression in Scheme
This example shows how you can return the result of evaluating a Boolean expression instead of using an if structure to check the condition. This can help simplify your code.
Source code: github.com/wadehuber/codeexamples/blob/master/scheme/scheme1/returnboolean.scm
0:11 - A program that returns true or false based on the result of a condition
0:28 - Rewriting to avoid the if - instead we simply return the result of the Boolean condition
1:10 - The same thing, but this time using not to flip the result
Source code: github.com/wadehuber/codeexamples/blob/master/scheme/scheme1/returnboolean.scm
0:11 - A program that returns true or false based on the result of a condition
0:28 - Rewriting to avoid the if - instead we simply return the result of the Boolean condition
1:10 - The same thing, but this time using not to flip the result
Просмотров: 60
Видео
Prolog queries that return false after true (Enter vs Spacebar)
Просмотров 572 месяца назад
This video explains why sometimes you see a "false" answer for a query that also returns true. TL;DR - use "Enter" when you get a query result you are happy with 0:05 - The example rule we will use 0:24 - Side note: don't use "is" (or anything else) to check for equality - just use the value! 0:43 - Consulting the file 0:49 - Responding to a query result with Enter 1:18 - Responding to a query ...
Writing Pair Procedures in Scheme
Просмотров 582 месяца назад
Writing Scheme procedures with a pair as a parameter Link to code: github.com/wadehuber/codeexamples/blob/master/scheme/scheme2/pairprocedures.scm 0:02 - Review of pairs in Scheme 0:13 - Procedures that work with pairs: cons, car, & cdr (and pair?) 0:35 - Creating a pair with "cons" 0:44 - Creating named pairs with define 1:06 - Writing a pair procedure - the "in-order-pair?" predicate 2:25 - W...
Introduction to For Loops with Java
Просмотров 1064 месяца назад
This video introduces for loops in Java 0:12 - Syntax of a for loop 1:03 - Example for loop 2:30 - Example program without using a loop 3:06 - Rewriting using a for loop 4:25 - Comparison with original version & execution
Checking User Input Using an if Statement in Java
Просмотров 1454 месяца назад
0:08 - Initial program 0:28 - Reading an integer from the user 0:53 - Adding an if statement to check that the number is bigger than 10 1:40 - Adding a second condition to the if statement to check that the number is less than 20 2:20 - Adding an "else" condition to print an error message 2:40 - Checking for greater than or equal to / less than or equal to 3:05 - Using constants to hold the bou...
Downloading a Single File from GitHub
Просмотров 2836 месяцев назад
You can download an entire GitHub repository with "git clone", but sometimes you just want one file 0:04 - The GitHub repo with the file we want to download 0:11 - Looking at the file we want to download on GitHub 0:25 - Downloading the file 4:46 - Editing & running the file 0:59 - Copying the file to a new folder
Fix for missing file menu in SWI-Prolog (MacOS Sonoma)
Просмотров 2526 месяцев назад
0:07 - Example of the missing File / Edit / Settings / Run / Debug /Help 0:22 - Type init_win_menus. at the SWI-Prolog prompt 0:29 - The menus are back
Downloading & Setting Up SWI-Prolog on MacOS Sonoma (July 2024)
Просмотров 1,3 тыс.6 месяцев назад
This video walks through downloading & installing SWI-Prolog 9.2.5 on MacOS Sonoma 14.5. Hardware is an M3 MacBook Pro. 0:03 - Downloading SWI-Prolog from swi-prolog.org 0:45 - Installing SWI-Prolog on MacOS 0:58 - Launching SWI-Prolog 1:28 - Fix for missing menus (happens with some installs)
Consulting (opening) a .pl file in SWI-Prolog (MacOS Sonoma)
Просмотров 4576 месяцев назад
This video walks through consulting a file in SWI-Prolog under MacOS Sonoma. Note that you need to know the full path to the file before you consult it. 0:03 - Opening SWI_Prolog 0:13 - Navigating to the file location, opening with TextEdit 0:32 - Consulting the file: consult('FILEPATH_NAME'). 1:10 - Entering queries
Indentation in Python - Yes, Whitespace Matters!
Просмотров 1057 месяцев назад
In Python, code blocks are indicated by a common indent level. 0:06 - Code blocks 0:37 - Some guidelines for indenting Python code 1:08 - Code blocks in C are specified by { braces } 1:31 - A Python program with no indentation (no code blocks) 1:52 - Indenting if statements in Python 2:21 - PEP 8 - Style Guide for Python Code 2:51 - Indenting a loop inside an if statement 3:08 - Indenting the b...
Is Scheme's Prefix Notation Really That Weird?
Просмотров 927 месяцев назад
0:07 - Example of prefix notation in Scheme 0:49 - Infix notation in C (and other languages with a similar syntax like Java) 1:10 - Functions are the building block of functional languages like Scheme 1:20 - Writing a function in the imperative language C 1:35 - Do we use infix notation to call functions in C? 1:43 - Calling a function in C uses prefix notation - just like Scheme! 2:23 - Compar...
Installing PyCharm 2024.1.3 (Community Edition) on Windows 11
Просмотров 1,4 тыс.7 месяцев назад
0:04 - Downloading PyCharm from jetbrains.com/pycharm 0:35 - Launching the installer & selecting options 1:33 - Launching PyCharm 1:45 - Creating a Hello, World project
Installing Python 3.12 on Windows 11
Просмотров 2117 месяцев назад
0:05 - Check to see if Python is already installed 0:26 - Navigate to python.org & download the installer 0:44 - Running the installer 1:15 - A note about disabling the path length limit 1:31 - Testing the installation with "Hello, world"
Python "Hello, world" Example
Просмотров 1337 месяцев назад
0:05 - Create a file with a .py extension 0:10 - Python single line comments 0:18 - The print function 0:24 - Running the python program using WSL Ubuntu 0:38 - Discussion 1:17 - Python extension for Visual Studio Code
Zipping an Eclipse Java Package in macOS Sonoma
Просмотров 2869 месяцев назад
Zipping an Eclipse Java Package in macOS Sonoma
Conditional Statements in Scheme - "if" vs "cond"
Просмотров 5249 месяцев назад
Conditional Statements in Scheme - "if" vs "cond"
Boolean Operators in Scheme - and, or, xor, & not
Просмотров 19410 месяцев назад
Boolean Operators in Scheme - and, or, xor, & not
Installing DrRacket on macOS Sonoma (March 2024)
Просмотров 40810 месяцев назад
Installing DrRacket on macOS Sonoma (March 2024)
Resolving VNC Viewer "An authentication error occurred" connecting to a Mac
Просмотров 2,6 тыс.10 месяцев назад
Resolving VNC Viewer "An authentication error occurred" connecting to a Mac
Compiling Code at the Command Line - C & Java
Просмотров 25110 месяцев назад
Compiling Code at the Command Line - C & Java
Installing Racket 8.12 for Scheme Programming (March 2024)
Просмотров 45010 месяцев назад
Installing Racket 8.12 for Scheme Programming (March 2024)
Installing Eclipse on Windows 11 (January 2024)
Просмотров 3 тыс.11 месяцев назад
Installing Eclipse on Windows 11 (January 2024)
Installing WSL Ubuntu on Windows 11 (January 2024)
Просмотров 36 тыс.Год назад
Installing WSL Ubuntu on Windows 11 (January 2024)
CSC110 Project 10 Review - Writing 3 Java Methods
Просмотров 133Год назад
CSC110 Project 10 Review - Writing 3 Java Methods
CSC110 Project 6 Review - A Simple Caesar Cipher in Java
Просмотров 129Год назад
CSC110 Project 6 Review - A Simple Caesar Cipher in Java
Example Binary Tree Traversals - Preorder, Inorder, Postorder, & Level Order
Просмотров 5 тыс.Год назад
Example Binary Tree Traversals - Preorder, Inorder, Postorder, & Level Order
DrRacket - Setting the Default Language (to Scheme)
Просмотров 566Год назад
DrRacket - Setting the Default Language (to Scheme)
Conditional Statements - if-else versus switch statements
Просмотров 688Год назад
Conditional Statements - if-else versus switch statements
Concatenating (Joining) Strings in Java
Просмотров 272Год назад
Concatenating (Joining) Strings in Java