Christopher Dobey Christopher Dobey

Apple Buyback

The Apple October event is tomorrow and it’s widely thought that new iPad Pro’s will be unveiled. To get a head start I thought I’d giveback my soon to be previous generation iPad Pro to Apple and get a $200 gift card in exchange. But the option to giveback a 10.5” iPad Pro is not available. I ran into the same issue when attempting to sell back my then latest generation MacBook Pro; Apple wouldn’t allow it until roughly a week after the new model started shipping. This may be a precaution from Apple to inhibit an influx of people selling back their one generation old devices on launch day which could cause even longer lines. Or so people don’t realize that they’re only getting less than half of what they payed for the device when selling back to Apple. Who knows, but I still much prefer this giveback program to the alternative of waiting at coffee shop for a Craigslister to maybe maybe maybe show up and start bargaining.

Apple Giveback.png
Read More
Christopher Dobey Christopher Dobey

Python 'elif'

Can you build an else statement from scratch?

score = 111
if score < 100:
   print(“Almost there!”)
else :
   print(“You won!”)

You won!

Perfect! If score isn’t less than 100, it must be 100 or more.

Else needs to be the last part of an if statement. Can you get this code to make sense?

if 1 < 100:
   print(“Less than 100!”)
else:
   print(“Bigger than100!”
Less than 100!

Yes, that’s the order that makes sense!

There’s one more thing we can add to our if statement. elif allows us to add additional conditions beyond the initial condition.

hour = 12
if hour < 12:
   print(“Good morning”)
elif hour < 17:
   print(“Good afternoon”)

Good afternoon

Great! Now the computer displays Good afternoon when hour isn’t less than 12 but is less than 17.

Read More
Christopher Dobey Christopher Dobey

Unicode (UTF-16)

Let's put together a basic if statement that displaus Hello, World!.

if True:

print("Hello, World!")

Hello, World!

Correct

Yes! Because the condition is True, th computer executes the line.

To make practical sense, an if statement needs a boolean value that's only True if a condition is fulfilled.

Conditions in if statements work with all the comparisons we've already explored.

password = "Swordfish"

if password == "Swordfish":

print("Welcome!")

Welcome!

Correct

What a beautiful if statement!

Syntax Highlighting: Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colors and fonts according to the category of terms. This feature facilitates writing in structured langugage such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.

we can also build if statements that depend on numbers.

Let's check if we gathered enough points to win a video game.

score = 100

if score == 100:

print("You won!")

You won!

Correct

Great! Comparing numbers is very useful for things like programs that monitor the weather or keep track of scores.

We can also use the < sign to check if score is less than 100.

score = 50

if score < 100:

print("You need more points!")

You need more points!

Correct

Nice work! This code prints "You need more points!" to the console when the score is less than 100.

Read More
Christopher Dobey Christopher Dobey

Unicode (UTF-8)

In order for HTML functionality to be used in the creation of an email, the Rich Text editor must be turned on.

Plain Text: Plain text contains no formatting, only line breaks and spacing. Therefore no text formatting (such as font sizes and colors, bolding or italics) can be used.

Since it allows for text formatting, Rich Text is a popular default format for the creation of emails. But, it should be noted that depending on a recipients email settings, they may not be able to view emails in Rich Text/HTML format and therefor they will need to receieve emails in Plain Text.

line break

noun PRINTING

the point at which two lines of text are split; the end of a line.

“even the freest free verse must justify its rhythms and line breaks”

What is a line break?

Line break

Updated: 04/01/2018 by Computer Hope

A single break that returns the cursor to the next line and does not create a new paragraph. In HTML, to create a line break, you’d enter the <br> tag. In other programs, the shortcut key to create a line break is Shift+Enter.

Whem format markers are enabled in a word processor, line breaks are often represented by an arrow pointing down and the the left, as in the picture.

We let the computre know when the condition is over by ending the line with a colon, :

if True:

print(“Hello, World!”)

Hello, World!

Correct

There we go! The colon separates the condition and the next instruction.

Read More