DEV Community

Gabor Szabo
Gabor Szabo

Posted on • Originally published at code-maven.com

1

Python Programming Bootcamp #6 - if, else, elif

00:00 "Second steps" starting at Input/Output till the exercises.
00:00 Input - Output I/O
05:23 print in Python 2
08:12 print in Python 3
13:00 from future import print_function
14:57 Exception: SyntaxError: Missing parentheses in call
15:50 Prompting for user input in Python 2 (raw_input)
19:20 Prompting for user input in Python 3 (input)
26:01 Prompting in both Python 2 and Python 3.
28:45 Add numbers entered by the user. oups
32:30 How can I check if a string can be converted to a number?
37:26 Nóra pointing out the error in the previous example. Oups.
38:23 Converting string to int
41:49 Conditionals: if, else, elif
53:20 Ternary operator (Conditional Operator)
56:00 Case and switch in Python.
56:30 Exercises: Rectangle, Circle, Calculator
57:40 Learning Python the Hard way.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more