קורס יסודות בינה מלאכותית – RB23-07
- בינה מלאכותית המהפכה
העשרה
1.1 תרגיל העשרה – תרגול עצמי , צפה בסרטון הבא (בכיתה או שלב שלב עם המרצה )
1.2 https://www.youtube.com/watch?v=PaeEMpIdMM0
2. מקירוסופט קו- פיילוט -מערכת של מיקרוסטופט – מלווה את המשתמש בעבדוה משחקים שאלות בעזרת עבודה .
מערכות A.I מבוזרות שעובדות יחד עם בן אדם , שעוברות יחד עם חומרה A.I NPU
NPU – neural processing units
https://copilot.microsoft.com/
העשרה :
3. יצירת קוד תוכנה בעזרת בינה מלאכותית
3.1 קישור לאתר קולאב https://colab.research.google.com/
3.2 נריץ את הקוד הבא
1 2 3 4 5 6 7 8 9 |
# Define the salary variable SALARY = 1000 # You can change this value to the desired salary # Calculate 47% of the salary percentage = 0.47 result = SALARY * percentage # Print the result print(f"47% of {SALARY} is {result}") |
3.3 קוד הבא : צור קוד תוכנה בשפת פייטון , (בשפה האנגלית בלבד ) מסופרת מ 1 עד 100 ואם המספר מתחלק ב 7 היא מדפיסה אותו למסך ואם מתחלק ב 10 מדפיסה * למסך
1 2 3 4 5 |
for number in range(1, 101): if number % 7 == 0: print(number) if number % 10 == 0: print("*") |
במבוא לשפת פייטון
5 תרגיל כיתה – תרגול שפת פייטון לבינה מלאוכתית
5.1 היכנס ל GMAIL
5.2 היכנס ל COLAB (בעזרת חשבון GMAIL )
5.3 תרגל את קוד הדוגמאות הבאות
5.4 הרץ את הקוד הבא ב COLAB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
number = 5 # Checking if number is positive if number > 0: print("The number is positive.") # Checking if number is 5 or more if number >= 5: print("The number is 5 or more.") # Checking if number is 5 or less if number <= 5: print("The number is 5 or less.") # Checking equality (there is no '===' in Python) if number == 5: print("The number is exactly 5.") |
5.5 העזר בבינה מלאכותית לשינוי קוד
5.5.1 כתוב מ CHATGPT לשנות את קוד התוכנה ש number יהיה בעל ערך אקראי בין 0 ל 10 הדפסת את number
- העזר במרצה – פנה אליו אם לא ברור
5.5.2
הוסף לתוכנה
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# Checking if the number is positive if number > 0: print("The number is positive.") # Checking if the number is 5 or more if number >= 5: print("The number is 5 or more.") # Checking if the number is 5 or less if number <= 5: print("The number is 5 or less.") # Checking equality with 5 if number == 5: print("The number is exactly 5.") |
לולאות שקיימות בעיקר בבינה מלאכותית
3.4 תרגיל כיתה
3.4.1 כתוב לולאה שסופרת מ 0 עד 10 אם המספר שווה ל 5 הדפס 5
3.4.2
1 2 3 4 |
# לולאה שסופרת מ-0 עד 10 for number in range(11): # range(11) כולל את המספרים מ-0 עד 10 if number == 5: print(number) # הדפס 5 אם המספר שווה ל-5 |
3.4.5 נתח את הקוד הבא – העזר במרצה אם צריך
1 2 3 4 5 6 |
# Define the list 'results' with the required elements results = ["car", "person", "phone", "dog", "cat"] # Use a 'for' loop to process and print each item in the list for item in results: print(item) |
3.4.6 הוסף משפט תנאי
אם שווה ל רכב כתוב רכב
1 2 3 4 5 6 7 8 9 |
# Define the list 'results' with the required elements results = ["car", "person", "phone", "dog", "cat"] # Use a 'for' loop to process and print each item in the list for item in results: print(item) # Check if the current item is 'car' if item == "car": print("Car found") |
3.5 בקש מ CHATGPT לכתוב בשפת פייטון תכונה
3.5.1 כתובת תכונה אשר מקבלת את משקל גוף בגרמים את הגובה מהקרקע ומחשבת מתי הגוף יפגע בקרקע
4. יצירת קוד בבינה מלאכתות בעזרת בינה מלאכותית
(מהוא מיקרו בקר ואיך כותבים תוכנה למיקרו בקר )
4.1 מבוא למיקרו מעבד , פינים ורכיבים אלקטרונים .
תרגול 001 – הדלקה וכיבוי של לד בשפת C
4.3 קישור לקוד
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
void setup() { // put your setup code here, to run once: Serial.begin(115200); Serial.println("Hello, robotronix.co.il"); pinMode (4, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite (4, HIGH); // turn on the LED , HIGH = 3.3V delay(500); // 1000 = 1 SEC --> 1000ms digitalWrite (4, LOW); // turn on the LED , LOW = 0V delay(1000); // 1000 = 1 SEC --> 1000ms } |
4.4 תרגול 002 – קריאת כפתור הדלקת לד בשפת C
- בניית מעגל אלקטורני של לד וחיבור למיקרו בקר
- בניית מעגל אלקטורני של ככפתור פיקוד וחיבור למיקרובקר
- נכתוב תכונה בשםת C – כשאר נלחץ על הכפתור הלד ידלק , כאשר לא נלחץ על הכפתור הלד לא ילדק .
את התוכנה נכתוב ב WOKWI.COM
קישור לתוכנה : https://wokwi.com/projects/348323129018286675
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#define led 4 #define button 12 int buttonState; void setup() { // initialize serial for debugging Serial.begin(115200); Serial.println(); pinMode(button, INPUT_PULLUP); pinMode(led,OUTPUT); } void loop() { buttonState = digitalRead(button); if ( buttonState==0) { digitalWrite(led, HIGH); } else { digitalWrite(led , LOW); } } |
4.5 שינוי קוד קיים – בעזרת בינה מלאוכתית גלאי מרחק ובמיקרו מעבד
4.6 קוד מקור https://wokwi.com/projects/399760959908478977
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
// www.robotronix.co.il // Distance sensor // learn arduino לימוד ארדואינו קורס C506 const int pingPin = 4; // Trigger Pin of Ultrasonic Sensor const int echoPin = 2; // Echo Pin of Ultrasonic Sensor void setup() { Serial.begin(9600); // Starting Serial Terminal } void loop() { long duration, inches, cm; pinMode(pingPin, OUTPUT); digitalWrite(pingPin, LOW); delayMicroseconds(2); digitalWrite(pingPin, HIGH); delayMicroseconds(10); digitalWrite(pingPin, LOW); pinMode(echoPin, INPUT); duration = pulseIn(echoPin, HIGH); inches = microsecondsToInches(duration); cm = microsecondsToCentimeters(duration); // Serial.print(inches); // Serial.print("in, "); Serial.print(cm); Serial.print("cm"); Serial.println(); delay(250); } long microsecondsToInches(long microseconds) { return (microseconds / 74 / 2); } long microsecondsToCentimeters(long microseconds) { return (microseconds / 29 / 2); } |
4.7 תרגיל כיתה – שינוי קוד בעזרת בינה מלאכותית CHATGPT
4.7.1 add to program red led if distance is less then 100 cm pin 0
4.7.2 add to program red led if distance is more or equal to 100 cm pin 5
1 |
COLAB
- אימון בינה מלאכותית