Learn Python to A.I Programming – Lesson 1

Lesson 1 – Printing and Running Python

  this is an A.I simple model code out goal is to learn A.I , and  A.I  programing

Output:
Example 1: Hello, world!
Example 2: I am learning Python for Artificial Intelligence.
Example 3: 2025
Example 4: 8
Example 5: Python is fun

Output:
Example 1: The result is 20
Example 2: Hello
     World
Example 3: She said "Python is amazing!"
Example 4: AI AI AI


Output:
Example 1: 1.1 2.22 3.333
Example 2: Average: 6.25
Example 3: Height: 1.76 m
Example 4: Age: 30, Weight: 72.6 kg
Example 5: Accuracy: 87.65%


Exercises – Lesson 1: Printing and Numbers

Exercise 1:

Write a program that prints your name and age on one line.


Exercise 2:

Print the result of 12.5 / 3 rounded to 2 decimal places.


Exercise 3:

Display the text "AI Power Level:" followed by the number 99.876 rounded to one decimal place.


Exercise 4:

Print three numbers (4, 8, 12) separated by commas, and then print their average rounded to 2 digits.


Exercise 5:

Show a floating number formatted as currency — for example 5.6789"$5.68".

Solutions

כתיבת תגובה