PES
EN English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure PES site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to PES, reload the page, and use the bell to enable notifications.

On iPhone or iPad, add PES to your Home Screen, open it there, then allow notifications.

My learning progress
  1. How to use AI
  2. Terminal commands
  3. Advanced AI
  4. Vibe coding
  5. AI certification Getting ready
  6. Keyboard
See details
All AI lessons
Stage 7

Python: run, inspect, change

Learning goal

Use variables, conditions, and functions in the browser.

Python is widely used for AI because libraries such as NumPy and scikit-learn provide numerical and machine-learning tools. PES runs Python in the browser using Pyodide. Loading the runtime and packages takes time. Printing a greeting checks that code runs; it does not train an AI model.

A closer look

The example below applies a rule written by a person. Change the score or threshold and predict the output before running it. A function uses return to give a value back; print only displays it. Test boundary cases such as a score exactly equal to the threshold. This rule-based program has no learning step.

Explain it yourself

A programmer changes an if-condition. Did the program learn from data?

Compare with an explanation

No. Editing a rule is programming. Learning requires a process that derives model behavior from data.

You mark this yourself. Nothing is graded here.

Mark this step as understood?

This cannot be undone yet, so mark it only when you really understand.

Marked as understood

You mark this yourself. Nothing is graded here.

Sources and further reading
Example code
question = "What is AI?"

if "AI" in question:
    answer = "AI is software for tasks such as prediction and generation."
else:
    answer = "Please give more context."

print(answer)

Guidelines

AI

AI Certification

Study

Vibe Coding

Game

Practice

Tutors

Chat

Forum

Create

Community

More

Glossary

Pick a word you don't know. You'll see a simple explanation and related terms.

No matching term yet.

Pick a term to see its explanation.