From b27f9f8ed66a564bd1f1bd4e82d7221e2bf2e495 Mon Sep 17 00:00:00 2001 From: Bram Barbieri Date: Sun, 10 Mar 2024 16:04:14 +0100 Subject: [PATCH] Bram Evidence folder --- .../Sprint1/FirstDocumentation.md | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/LearningProcessBram/Sprint1/FirstDocumentation.md b/docs/LearningProcessBram/Sprint1/FirstDocumentation.md index f5afd6d..b9508db 100644 --- a/docs/LearningProcessBram/Sprint1/FirstDocumentation.md +++ b/docs/LearningProcessBram/Sprint1/FirstDocumentation.md @@ -70,8 +70,6 @@ By doing this i got taught the following commands: ~ $ 'ping ip addres' ~ $ 'ssh username@ip address' = open ssh connection. -From here i went and looked up several linux video's wich taught me the following: -.... ### Air, temperature, and all sort of stuff. After the linux coding i decided to take a step back and began gaining experience with sensors. @@ -159,3 +157,37 @@ void loop() { } ``` +### Python For Dummies. +My job was to make a connection between the websocket and the database we had set up, and to do this we wanted to use python. +I had never used python before and was totaly new to the entire code structure and wording. +Because I was totaly new to all of python, I asked chatGPT for and example and some concrete code. +I asked it my question wich was the assignment I was given and tried to reverse learn this way. +I went and looked up fitting tutorials on W3SChools. +The following were used: +(https://www.w3schools.com/python/python_mysql_getstarted.asp) +(https://websockets.readthedocs.io/en/stable/) +(https://www.w3schools.com/python/python_mysql_insert.asp) +(https://www.w3schools.com/python/python_json.asp) + +after still not getting it verry well i asked Dano ( a teammate of mine ) if he could learn me soem basics, and so we did. +He taught me how to make a simple calculator and told me why my code worked the way it did. +(This was the code: +print("1 = + 2 = -") +c = int(input()) +print("first number") +a = input() + +print("second number") +b= input() + +if c == 1: + print(int(a) + int(b)) +elif c == 2: + print(int(a) - int(b)) + + ) +even if it looked simple,this was the ignition i needed to understand python better and continue my own research. + + + +