Welcome to your first week at Ryo University! In this lesson, you’ll learn the fundamentals of Python, one of the most popular programming languages in the world β€” and the one we’ll use to build Ryo applications later in the course.

πŸ“Œ What You’ll Learn

  • How to write your first Python program
  • Variables and data types
  • Operators and expressions
  • Conditional statements (if/else)
  • Loops (for and while)

πŸŽ₯ Video Course: Python for Beginners

πŸ“š Table of Contents

πŸ‘¨β€πŸ’» Try Python In Your Browser

Use this interactive window to practice writing Python code β€” no installation needed!

🧠 Key Concepts

1. Your First Python Program

print("Hello, world!")

This prints text to the screen. It’s the first step in every coder’s journey.

2. Variables & Data Types

Variables store information. Data types include integers, floats, strings, and booleans.


age = 25            # Integer
height = 5.9        # Float
name = "Alice"      # String
is_student = True   # Boolean
  

Python Data Types

3. Operators

Python supports math and comparison operators:


a = 10
b = 5
print(a + b)  # Addition
print(a > b)  # Greater than
  

4. Conditional Statements

Use if and else to make decisions.


age = 18
if age >= 18:
    print("You can vote!")
else:
    print("Too young to vote.")
  

Python If Else

5. Loops

For Loop


for i in range(5):
    print("Number:", i)
  

Python For Loops

While Loop


x = 0
while x < 5:
    print(x)
    x += 1
  

πŸ§ͺ Practice Challenge

Write a Python program that asks for the user’s name and age, then prints a greeting and calculates how many years until they turn 100!


# Sample input/output challenge
name = input("What's your name? ")
age = int(input("How old are you? "))
years_until_100 = 100 - age
print("Hello", name + "!")
print("You will turn 100 in", years_until_100, "years.")
  

βœ… Summary

  • Python is readable, powerful, and perfect for beginners.
  • Practice is key β€” experiment using the code editor above.
  • You’ve learned the basics of variables, conditionals, and loops.

Next week, we’ll dive into functions and modules to help you write cleaner, reusable code.

Ryo University Β© 2025 | Learn. Code. Mine. Earn Ryo.