From 4eb052e512305c9440b332634489fb13f690bc81 Mon Sep 17 00:00:00 2001 From: Bodecam Date: Wed, 4 Oct 2023 20:21:12 -0300 Subject: [PATCH] Work Home Done - Bruna Bodecam --- exercicios/para-casa/SadProject.py | 11 +++ .../para-casa/UsefulDate/CalculateAge.py | 2 + .../para-casa/UsefulDate/Calculation.py | 11 +++ exercicios/para-casa/UsefulDate/FormatDate.py | 1 + exercicios/para-casa/UsefulDate/LeapYear.py | 14 ++++ exercicios/para-casa/UsefulDate/UsefulAge.py | 17 +++++ .../para-casa/UsefulDate/UsefulYear-arq.py | 17 +++++ exercicios/para-casa/UsefulDate/__init__.py | 0 .../__pycache__/CalculateAge.cpython-311.pyc | Bin 0 -> 376 bytes .../__pycache__/Calculation.cpython-311.pyc | Bin 0 -> 714 bytes .../__pycache__/FormatDate.cpython-311.pyc | Bin 0 -> 220 bytes .../__pycache__/LeapYear.cpython-311.pyc | Bin 0 -> 683 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 218 bytes .../__pycache__/dataUsefull.cpython-311.pyc | Bin 0 -> 216 bytes exercicios/para-casa/UsefulDate/dataAGE.py | 1 + .../para-casa/UsefulDate/dataYEARBORN.py | 1 + exercicios/para-casa/__init__.py | 0 .../ExerciseOne/Mathematics/Calculation.py | 11 +++ .../ExerciseOne/Mathematics/__init__.py | 0 .../__pycache__/Calculation.cpython-311.pyc | Bin 0 -> 744 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 248 bytes .../ExerciseOne/MyCalculation.py | 12 ++++ .../dataExerciceStudants.csv | 2 + .../Exercise in the Room/dataExerciseOne.txt | 2 + .../dataExerciseStudants.csv | 2 + .../Exercise in the Room/dataExerciseTwo.json | 1 + .../manipulationExercise.py | 42 ++++++++++++ .../Package/PackageBodecam/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 230 bytes .../__pycache__/moduleOne.cpython-311.pyc | Bin 0 -> 477 bytes .../Package/PackageBodecam/moduleOne.py | 5 ++ .../Package/Sum/Motorcycle/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 230 bytes .../__pycache__/sumMotorcycle.cpython-311.pyc | Bin 0 -> 381 bytes .../Package/Sum/Motorcycle/sumMotorcycle.py | 2 + exercicios/para-sala/Package/Sum/__init__.py | 0 .../Sum/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 219 bytes .../Sum/__pycache__/sumHouse.cpython-311.pyc | Bin 0 -> 361 bytes exercicios/para-sala/Package/Sum/sumHouse.py | 2 + exercicios/para-sala/Package/main.py | 12 ++++ exercicios/para-sala/Revision/Main.py | 3 + .../Revision/Manipulation/Exercise.py | 27 ++++++++ .../PackageRevision/CelsiustoFahrenheit.py | 3 + .../PackageRevision/KilometersToMiles.py | 3 + .../PackageRevision/MeteersForFeet.py | 3 + .../Revision/PackageRevision/__init__.py | 0 exercicios/para-sala/Room/data.json | 2 + exercicios/para-sala/Room/data.txt | 5 ++ exercicios/para-sala/Room/dataOne.txt | 1 + exercicios/para-sala/Room/manipulation-arq.py | 63 ++++++++++++++++++ exercicios/para-sala/Room/people.csv | 3 + 51 files changed, 281 insertions(+) create mode 100644 exercicios/para-casa/SadProject.py create mode 100644 exercicios/para-casa/UsefulDate/CalculateAge.py create mode 100644 exercicios/para-casa/UsefulDate/Calculation.py create mode 100644 exercicios/para-casa/UsefulDate/FormatDate.py create mode 100644 exercicios/para-casa/UsefulDate/LeapYear.py create mode 100644 exercicios/para-casa/UsefulDate/UsefulAge.py create mode 100644 exercicios/para-casa/UsefulDate/UsefulYear-arq.py create mode 100644 exercicios/para-casa/UsefulDate/__init__.py create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/CalculateAge.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/Calculation.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/FormatDate.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/LeapYear.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/__init__.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/__pycache__/dataUsefull.cpython-311.pyc create mode 100644 exercicios/para-casa/UsefulDate/dataAGE.py create mode 100644 exercicios/para-casa/UsefulDate/dataYEARBORN.py create mode 100644 exercicios/para-casa/__init__.py create mode 100644 exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/Calculation.py create mode 100644 exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/__init__.py create mode 100644 exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/__pycache__/Calculation.cpython-311.pyc create mode 100644 exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/__pycache__/__init__.cpython-311.pyc create mode 100644 exercicios/para-sala/Exercise Package/ExerciseOne/MyCalculation.py create mode 100644 exercicios/para-sala/Exercise in the Room/dataExerciceStudants.csv create mode 100644 exercicios/para-sala/Exercise in the Room/dataExerciseOne.txt create mode 100644 exercicios/para-sala/Exercise in the Room/dataExerciseStudants.csv create mode 100644 exercicios/para-sala/Exercise in the Room/dataExerciseTwo.json create mode 100644 exercicios/para-sala/Exercise in the Room/manipulationExercise.py create mode 100644 exercicios/para-sala/Package/PackageBodecam/__init__.py create mode 100644 exercicios/para-sala/Package/PackageBodecam/__pycache__/__init__.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/PackageBodecam/__pycache__/moduleOne.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/PackageBodecam/moduleOne.py create mode 100644 exercicios/para-sala/Package/Sum/Motorcycle/__init__.py create mode 100644 exercicios/para-sala/Package/Sum/Motorcycle/__pycache__/__init__.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/Sum/Motorcycle/__pycache__/sumMotorcycle.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/Sum/Motorcycle/sumMotorcycle.py create mode 100644 exercicios/para-sala/Package/Sum/__init__.py create mode 100644 exercicios/para-sala/Package/Sum/__pycache__/__init__.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/Sum/__pycache__/sumHouse.cpython-311.pyc create mode 100644 exercicios/para-sala/Package/Sum/sumHouse.py create mode 100644 exercicios/para-sala/Package/main.py create mode 100644 exercicios/para-sala/Revision/Main.py create mode 100644 exercicios/para-sala/Revision/Manipulation/Exercise.py create mode 100644 exercicios/para-sala/Revision/PackageRevision/CelsiustoFahrenheit.py create mode 100644 exercicios/para-sala/Revision/PackageRevision/KilometersToMiles.py create mode 100644 exercicios/para-sala/Revision/PackageRevision/MeteersForFeet.py create mode 100644 exercicios/para-sala/Revision/PackageRevision/__init__.py create mode 100644 exercicios/para-sala/Room/data.json create mode 100644 exercicios/para-sala/Room/data.txt create mode 100644 exercicios/para-sala/Room/dataOne.txt create mode 100644 exercicios/para-sala/Room/manipulation-arq.py create mode 100644 exercicios/para-sala/Room/people.csv diff --git a/exercicios/para-casa/SadProject.py b/exercicios/para-casa/SadProject.py new file mode 100644 index 0000000..b3e85a9 --- /dev/null +++ b/exercicios/para-casa/SadProject.py @@ -0,0 +1,11 @@ +from UsefulDate import Calculation +from UsefulDate import CalculateAge +from UsefulDate import LeapYear + + +sumAge = CalculateAge.CalculateAge(2023, 1996) +print(f"Bruna have {sumAge} age" ) + +sumLeapYear = LeapYear.leap_year(1996) +print(sumLeapYear) + diff --git a/exercicios/para-casa/UsefulDate/CalculateAge.py b/exercicios/para-casa/UsefulDate/CalculateAge.py new file mode 100644 index 0000000..1e3b8e0 --- /dev/null +++ b/exercicios/para-casa/UsefulDate/CalculateAge.py @@ -0,0 +1,2 @@ +def CalculateAge(current_year, year_born): + return current_year - year_born \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/Calculation.py b/exercicios/para-casa/UsefulDate/Calculation.py new file mode 100644 index 0000000..45377a4 --- /dev/null +++ b/exercicios/para-casa/UsefulDate/Calculation.py @@ -0,0 +1,11 @@ +def sum(a, b): + return a + b + +def subtraction(a, b): + return a - b + +def multiplication(a, b): + return a * b + +def division(a, b): + return a / b \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/FormatDate.py b/exercicios/para-casa/UsefulDate/FormatDate.py new file mode 100644 index 0000000..c99528c --- /dev/null +++ b/exercicios/para-casa/UsefulDate/FormatDate.py @@ -0,0 +1 @@ +#IREI FAZER, TÁ? EU JURO \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/LeapYear.py b/exercicios/para-casa/UsefulDate/LeapYear.py new file mode 100644 index 0000000..ae01e51 --- /dev/null +++ b/exercicios/para-casa/UsefulDate/LeapYear.py @@ -0,0 +1,14 @@ +from datetime import date + +def leap_year(year): + if year%4 == 0: + if year % 100 == 0: + if year % 400 == 0: + return True + else: + print("Was born in a Leap year") + return True + else: + print("It wasn't a leap year") + return False + \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/UsefulAge.py b/exercicios/para-casa/UsefulDate/UsefulAge.py new file mode 100644 index 0000000..5f58fcb --- /dev/null +++ b/exercicios/para-casa/UsefulDate/UsefulAge.py @@ -0,0 +1,17 @@ +import csv +import json + +data = [] +def add_info_in_usefull(): + age = input("Enter u age \n") + + list ={age: int()} + + data.append(list) + + with open("dataAGE.py", "w", newline= "") as arq_csv: + writer_csv = csv.writer(arq_csv) + writer_csv.writerows(data) + return data + +add_info_in_usefull() \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/UsefulYear-arq.py b/exercicios/para-casa/UsefulDate/UsefulYear-arq.py new file mode 100644 index 0000000..6b0de53 --- /dev/null +++ b/exercicios/para-casa/UsefulDate/UsefulYear-arq.py @@ -0,0 +1,17 @@ +import csv +import json + +data = [] +def add_info_in_usefull(): + year_born = input("Enter the year you were born \n") + + list ={year_born: int()} + + data.append(list) + + with open("dataYEARBORN.py", "w", newline= "") as arq_csv: + writer_csv = csv.writer(arq_csv) + writer_csv.writerows(data) + return data + +add_info_in_usefull() \ No newline at end of file diff --git a/exercicios/para-casa/UsefulDate/__init__.py b/exercicios/para-casa/UsefulDate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/exercicios/para-casa/UsefulDate/__pycache__/CalculateAge.cpython-311.pyc b/exercicios/para-casa/UsefulDate/__pycache__/CalculateAge.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73f1138f40271a1541f7ee01a37296690d6efe77 GIT binary patch literal 376 zcmZ3^%ge<81e;x@Q~iPTV-N=h7@>^MJV3^Dh7^VthA4&<#$X0brer3VA|MT7GXpVH zT@6DGV-?U;pgKmsl|aR}c#=ztic<4R;ww`Vi*9j($oQoEqP${|P6dTug~?Vip~b01 z#W7C#DXGbcxiPNAC8a6(#WDGLMrOJNl_eSZdAh|0mb!^Wg{7Hg`Ng^giOKmTsl~dv z`6;D2K!vFlsYS_|$(cZAL1Iy&ZgOIABFN0N(j1q>lGGUI#GK^P93aavJyoxu@)i%W zKoL989U$Kp^8$$mh8x`CGc+%9D_>wy{tOgg@Y7@jD=7l`vWNpjumOo*95!I$4GVEGx0JTVCU^8`uS5(3gMn>V5tR>yO&>MP03e8b#_Yufb}$5AUo3Fh)Z(#IL~GXo6c4H1RS_GThO2tX`id&5Q6sbEU&; z$v7o(c&k&xqz+~G9gzx`uIE`s%J!B>L4Lhrd$WHWF~?^{=yX%Q~*tgA^|0u zSj{IB-H?=rO%hQPkyOa;Q8LJUZDO?r?l$7A3@}39<;r{S<8*XCgDqMc2Wo30Wkafh zg(AQrkSYPs%Gz{NMX2>uRXA~Dwryn%*BXG}YJ;8FM5#z3L0vAj3#yw|{{J5EA*($~ zO!S4e32LD1gmd*)qu@Gp;hei0`m4i6bUn;Vm+mL=E42q_ws3t1F!eFUQxD_X6y>my NGk3Onn_qK%{sNG0ijx2U literal 0 HcmV?d00001 diff --git a/exercicios/para-casa/UsefulDate/__pycache__/FormatDate.cpython-311.pyc b/exercicios/para-casa/UsefulDate/__pycache__/FormatDate.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c446725ea047fe9417fd8a77bab004ba4d9a93a4 GIT binary patch literal 220 zcmXwzI|>3Z5QY;)5n-|Q3KkKu5M0EK9Ea9Dsha)qu0pRjK) b@7ClyXQr+Z@23x`6XjXwoIlxLTs`JK>gPNB literal 0 HcmV?d00001 diff --git a/exercicios/para-casa/UsefulDate/__pycache__/LeapYear.cpython-311.pyc b/exercicios/para-casa/UsefulDate/__pycache__/LeapYear.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..32cdafe86bd89eb80a2a09b2ccf0b88cbf014824 GIT binary patch literal 683 zcmZWm&ubGw6rRa$(@m3YY-@=k;)0kG%t{dvEMoCjL6Cx^B9?_R-5GH)`@@;pYEmIp zdPsZPTl*I%;y<&69+q6iLvF#~r6=D6TMT{dKHmHI=6m0~`DU6^2x9H`Rknf=`l*`J z$o(sZm!LR66j9tnK3>Nd(cCUt&rz*`YINOf;T6v~Tr;y+$; zUJAyA^C+auCBE}i$e4!034_~r?WiT+hJh^>@7aXEkG-u>*b#9<$%O5PG;RWsePrDA zTo1~KaALbe5T*GhZa#qpJIdQ@n0PB{^$N<-hMLdSGpb#S4M;mEn=E!8e%?xEzHIMo zXT@@IeQ)V-W`DW6oR#Micdvc;V!zYvWR)w49BAmmwQlE69+|W0?9HQ6{kT+5OZ9B7 zlHB=anCbM5Bcpn3R8ymxl`nSVA&fw)HLYi;CzqbjxEek3@E!4@stb@#jQgWou?Kt_ cTD2mv2x*{Uj5BmO9sdUU6rLZT^J%2`7l_@b)Bpeg literal 0 HcmV?d00001 diff --git a/exercicios/para-casa/UsefulDate/__pycache__/__init__.cpython-311.pyc b/exercicios/para-casa/UsefulDate/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..336c3a63a57bcfbaae6ef313490e772ce0c981f4 GIT binary patch literal 218 zcmZ3^%ge<81X&dlsUZ3>h=2h`DC095kTIPhg&~+hlhJP_LlF~@{~09tE7#d7CbT%U zs5r(cKP5FeF*nAwxTG{Czc?m8&&W)-pt2+*KTo&Vz*0A{sIWA%EWcQ{ATc?=B(+#K zH$SB`2dFT$BDE+vGdUB;EJ!R$)J;w-P6U~mR+{6ISdtnOAD@|*SrQ+wS5Wzj!v?G? d)vkyYXgkP##r#0x12ZEd;|B&9QN#=s0|1LEJ97X4 literal 0 HcmV?d00001 diff --git a/exercicios/para-casa/UsefulDate/__pycache__/dataUsefull.cpython-311.pyc b/exercicios/para-casa/UsefulDate/__pycache__/dataUsefull.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f149ce6f7a0806a9ca9d0805d66a9bc2a13aec16 GIT binary patch literal 216 zcmZ3^%ge<81n;z@QaOS2V-N=h7@>^MY(U0zh7^Wi22Do4l?+8pK>lZtFkD{5&Hw-Ga)JjQl*^VgpOv#G=B|%(DDq-GapA{F2mS z-Q4_?(j1_|)QZ%i=f1JWYE2z?hz zZ@u^9(RB(TS~)D3+CoxWAafe>0P}HW0eDhWaXXTPYE4;&j49K9A+_L20cf~fV9Sra zNQ9oCW-hr6UDtK{|7*ZQmTMH4=nJJMs6c1aIP2c5<&1}BIHPWg{_M~r8XsnbbMuA# gLhe9L8?LSZrZ&cSYGGWNq72qDW^&8J?3(fO7g?K@P5=M^ literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/__pycache__/__init__.cpython-311.pyc b/exercicios/para-sala/Exercise Package/ExerciseOne/Mathematics/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f62a9569a57a59187a5e8b12b2686470a929f804 GIT binary patch literal 248 zcmX|5y9xp^5KI(B1hKWWwTOs?pooQH=>xqel?6AzWQYkZ!v#nt^?-~8Tzv5Z+;=)3XL_9L73-WzTQM^OL( literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Exercise Package/ExerciseOne/MyCalculation.py b/exercicios/para-sala/Exercise Package/ExerciseOne/MyCalculation.py new file mode 100644 index 0000000..41d1588 --- /dev/null +++ b/exercicios/para-sala/Exercise Package/ExerciseOne/MyCalculation.py @@ -0,0 +1,12 @@ +from Mathematics import Calculation + +a = 3 +b = 2 + +print(Calculation.sum(a, b)) + +print(Calculation.subtraction(a, b)) + +print(Calculation.multiplication(a, b)) + +print(Calculation.division(a, b)) \ No newline at end of file diff --git a/exercicios/para-sala/Exercise in the Room/dataExerciceStudants.csv b/exercicios/para-sala/Exercise in the Room/dataExerciceStudants.csv new file mode 100644 index 0000000..30bdb4b --- /dev/null +++ b/exercicios/para-sala/Exercise in the Room/dataExerciceStudants.csv @@ -0,0 +1,2 @@ +Beyonce,42,10 +Bruna ,27,10 diff --git a/exercicios/para-sala/Exercise in the Room/dataExerciseOne.txt b/exercicios/para-sala/Exercise in the Room/dataExerciseOne.txt new file mode 100644 index 0000000..6e9e478 --- /dev/null +++ b/exercicios/para-sala/Exercise in the Room/dataExerciseOne.txt @@ -0,0 +1,2 @@ +Bruna de Macedo Santos +Garota Gamer amante de World Of Warcraft \ No newline at end of file diff --git a/exercicios/para-sala/Exercise in the Room/dataExerciseStudants.csv b/exercicios/para-sala/Exercise in the Room/dataExerciseStudants.csv new file mode 100644 index 0000000..a3a6567 --- /dev/null +++ b/exercicios/para-sala/Exercise in the Room/dataExerciseStudants.csv @@ -0,0 +1,2 @@ +Beyonce,42,10 +Bruna,27,10 diff --git a/exercicios/para-sala/Exercise in the Room/dataExerciseTwo.json b/exercicios/para-sala/Exercise in the Room/dataExerciseTwo.json new file mode 100644 index 0000000..be72f76 --- /dev/null +++ b/exercicios/para-sala/Exercise in the Room/dataExerciseTwo.json @@ -0,0 +1 @@ +[{"Name": "Beyonce", "Age": 42, "City": "Houston Texas", "Profission": "Singer, Performer and Actor", "Resume": "American singer, songwriter, and businesswoman. Known as Queen Bey, she has been widely recognized for her boundary pushing artistry, vocals, and performances. Her contributions to music and visual media and her concert performances have led her to become a prominent cultural figure of the 21st century. She was named the eighth greatest singer of all time by Rolling Stone in 2023."}] \ No newline at end of file diff --git a/exercicios/para-sala/Exercise in the Room/manipulationExercise.py b/exercicios/para-sala/Exercise in the Room/manipulationExercise.py new file mode 100644 index 0000000..c0fe327 --- /dev/null +++ b/exercicios/para-sala/Exercise in the Room/manipulationExercise.py @@ -0,0 +1,42 @@ +import csv +import json + +#Exercise + +# with open("./dataExerciseOne.txt", "r") as arq: #read +# content = arq.read() +# print(f"{content} - Bodecam") + + +# data = [{"Name": "Beyonce", "Age": 42, "City": "Houston Texas", "Profission": "Singer, Performer and Actor", +# "Resume": "American singer, songwriter, and businesswoman. Known as Queen Bey, she has been widely recognized for her boundary pushing artistry, vocals, and performances. Her contributions to music and visual media and her concert performances have led her to become a prominent cultural figure of the 21st century. She was named the eighth greatest singer of all time by Rolling Stone in 2023."}] +# with open("dataExerciseTwo.json", "w") as arquive_json: +# json.dump(data, arquive_json) +# with open("dataExerciseTwo.json", "r") as arquive_json: +# data = json.load(arquive_json) +# print(data) + + +data = [["Beyonce", 42, 10], ["Bruna ", 27, 10]] + +# with open("dataExerciceStudants.csv", "w", newline= "") as arq_csv: +# writer_csv = csv.writer(arq_csv) +# writer_csv.writerows(data) + +total_grade = 0 +total_studants = 0 + +with open("dataExerciceStudants.csv", "r") as arq: + reader_csv = csv.reader(arq) + for line in reader_csv: + name, age, grade = line + grade = float(grade) + total_grade = total_grade + grade + total_studants = total_studants + 1 + + if total_studants > 0: + average = grade / total_studants + print(f"Average grade: {average}") + + else: + print("No have studants in arquive") \ No newline at end of file diff --git a/exercicios/para-sala/Package/PackageBodecam/__init__.py b/exercicios/para-sala/Package/PackageBodecam/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/exercicios/para-sala/Package/PackageBodecam/__pycache__/__init__.cpython-311.pyc b/exercicios/para-sala/Package/PackageBodecam/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed354014bdbf9d7221a463bdf8c654376cb30910 GIT binary patch literal 230 zcmZ3^%ge<81XrRYQbF`%5CH>>P{wCAAY(d13PUi1CZpd4p3ogMQTxUW^yKwS&&$is9T(vlNb|_n4F!Mo(iL3hR4Te=4F<|$LkeT{^GC! fn~-W(#0qo?$gRcvK;i>4BO~Jn1{hJq3={(Z7-~R4 literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Package/PackageBodecam/__pycache__/moduleOne.cpython-311.pyc b/exercicios/para-sala/Package/PackageBodecam/__pycache__/moduleOne.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8238c1010d11c66987dedc20eb2b982b24b0c94 GIT binary patch literal 477 zcmZ8d!Ab)$5Y6n?R&0Av6g;-a9wH(rRK$Z?yhs(qi!4aY23_oKwwbQj(nAj(>KF7A z#6Oa~`U8dDdU6t74-VwbOXkhwCGYk68lyP7+g2UQUv^Uj{F226kr@lwE4yVO5JKo( zvz9LlrOj6D(^`}XNDZX$x}(Z@WO~?aelX*zRAkH1>0xk#%3yG!LnTEVba0S`8Uvl| z9q@EGc+?5U-8L7dpGD6ac`BqHDCDsYvmOc6i!w5j5z$l_!BO-?a3$oEcu++yhPxhh znW&v~n3rM^CB~YxjDOOK!k%bn{Qkr^AaF^q`O%b@F?)ADi>P{wCAAY(d13PUi1CZpd4p3ogMQTxUW^yKwS&&$is9T(vlNb|_n4F!Mo*ENenj7PrUy@&xT$!Ac8WSI% rnU`4-AFo$X`HRB_Y(lDC5i8IoAh#Ct1BnmJjEsyQ7+^#ZGf)fwP9s3T literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Package/Sum/Motorcycle/__pycache__/sumMotorcycle.cpython-311.pyc b/exercicios/para-sala/Package/Sum/Motorcycle/__pycache__/sumMotorcycle.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa949444f51ec0c2cd5acaceffc3e1e070672f96 GIT binary patch literal 381 zcmZ3^%ge<81RdEDsa8PxF^B^Lj8MjB9w1{nLkdF+Lli>_V=#jzQ!-2rq=X5GnSmIp zt_G;43djYi^LxnxWUXY-WW2>ySelqu5}%u2l3xtct?;YP*(xTqIJKxa#wkA~H90Xi z#HZa`a7M;P^X?KA|@-vXn;HSw5R#61!r9LoV5@7uROg>-E literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Package/Sum/Motorcycle/sumMotorcycle.py b/exercicios/para-sala/Package/Sum/Motorcycle/sumMotorcycle.py new file mode 100644 index 0000000..d11d2f6 --- /dev/null +++ b/exercicios/para-sala/Package/Sum/Motorcycle/sumMotorcycle.py @@ -0,0 +1,2 @@ +def sum_motorcycle(quant_moto): + return quant_moto + 4 \ No newline at end of file diff --git a/exercicios/para-sala/Package/Sum/__init__.py b/exercicios/para-sala/Package/Sum/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/exercicios/para-sala/Package/Sum/__pycache__/__init__.cpython-311.pyc b/exercicios/para-sala/Package/Sum/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c78c2355b68e7158200e58e76368f477f56464b GIT binary patch literal 219 zcmZ3^%ge<81e@a}QbF`%5CH>>P{wCAAY(d13PUi1CZpd4p3ogMQTxUW^yKwS&&$is9T(vlNb|_n4F!Mo*ENeni~@zpP83g5+AQuQ2C3) g2COaBu80+AJ;;H@{6OLZGb1D82L>2X#0(Sz0Q4(6_y7O^ literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Package/Sum/__pycache__/sumHouse.cpython-311.pyc b/exercicios/para-sala/Package/Sum/__pycache__/sumHouse.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8f2714845fc3808561948a7bda0ec780137b666 GIT binary patch literal 361 zcmZ3^%ge<81b4F~Qq6(%V-N=h7@>^MJV3^Dh7^VthA4&<#$X0brev5LNC^`VGXpVH zT@6r86_5*3=l2pMxspMX@fLSsX<}YUd`5n0acVJ0yTY$LXRDad;?$zz7^nP{)a1n6 z7}w&G(vtoqCb%>=rnofM17xLMLFFw@AP3@rB6gqyK#nK| z`K^KB2DjJ@!A|=NEK;9=duzoop;{!7z RBjX1qMn>rm444F1KLBUmSI__e literal 0 HcmV?d00001 diff --git a/exercicios/para-sala/Package/Sum/sumHouse.py b/exercicios/para-sala/Package/Sum/sumHouse.py new file mode 100644 index 0000000..3f7f2d8 --- /dev/null +++ b/exercicios/para-sala/Package/Sum/sumHouse.py @@ -0,0 +1,2 @@ +def sum_house(quant_house): + return quant_house + 2 \ No newline at end of file diff --git a/exercicios/para-sala/Package/main.py b/exercicios/para-sala/Package/main.py new file mode 100644 index 0000000..4d858a9 --- /dev/null +++ b/exercicios/para-sala/Package/main.py @@ -0,0 +1,12 @@ +from PackageBodecam import moduleOne +from Sum import sumHouse +from Sum.Motorcycle import sumMotorcycle + +# info = moduleOne.main() +# print(info) + +# my_sum = moduleOne.sum(1, 2) +# print(my_sum) + +sum_motorcycle_bruna = sumMotorcycle.sum_motorcycle(1) +print(f"Bruna have {sum_motorcycle_bruna} motorcycles") \ No newline at end of file diff --git a/exercicios/para-sala/Revision/Main.py b/exercicios/para-sala/Revision/Main.py new file mode 100644 index 0000000..64aaa4a --- /dev/null +++ b/exercicios/para-sala/Revision/Main.py @@ -0,0 +1,3 @@ +from PackageRevision import KilometersToMiles + +print(KilometersToMiles.kilometer_to_miles(1000)) \ No newline at end of file diff --git a/exercicios/para-sala/Revision/Manipulation/Exercise.py b/exercicios/para-sala/Revision/Manipulation/Exercise.py new file mode 100644 index 0000000..addfb42 --- /dev/null +++ b/exercicios/para-sala/Revision/Manipulation/Exercise.py @@ -0,0 +1,27 @@ +import csv + +books = [] + +#Para continuar salvando as informações passadas + +with open("books.csv", "r") as arq: + writing = csv.reader(arq) + for line in writing: + title, author, year = line + books.append([title, author, year]) + +while True: + title = input("Enter title of book or exit") + if title.lower() == "exit": + print("Leaving of program") + break + author = input("Enter name author:\n") + year = input("Enter year of publish:\n") + books.append([title, author, year]) + +with open("books.csv", "w", newline="") as arq: + writing = csv.writer(arq) + writing.writerows(books) + +if title.lower() != "Exit": + print("Information added successfully ") \ No newline at end of file diff --git a/exercicios/para-sala/Revision/PackageRevision/CelsiustoFahrenheit.py b/exercicios/para-sala/Revision/PackageRevision/CelsiustoFahrenheit.py new file mode 100644 index 0000000..26cdf9f --- /dev/null +++ b/exercicios/para-sala/Revision/PackageRevision/CelsiustoFahrenheit.py @@ -0,0 +1,3 @@ +def celsius_to_fahrenheit(fahrenheit): + celsius = (fahrenheit - 451 - 32) / 1.8 + return celsius \ No newline at end of file diff --git a/exercicios/para-sala/Revision/PackageRevision/KilometersToMiles.py b/exercicios/para-sala/Revision/PackageRevision/KilometersToMiles.py new file mode 100644 index 0000000..d2b05f7 --- /dev/null +++ b/exercicios/para-sala/Revision/PackageRevision/KilometersToMiles.py @@ -0,0 +1,3 @@ +def kilometer_to_miles(quilometers): + miles = quilometers / 1.609 + return miles \ No newline at end of file diff --git a/exercicios/para-sala/Revision/PackageRevision/MeteersForFeet.py b/exercicios/para-sala/Revision/PackageRevision/MeteersForFeet.py new file mode 100644 index 0000000..288f5c0 --- /dev/null +++ b/exercicios/para-sala/Revision/PackageRevision/MeteersForFeet.py @@ -0,0 +1,3 @@ +def meteers_for_feets(meteers): + feets = meteers * 3.28084 + return feets \ No newline at end of file diff --git a/exercicios/para-sala/Revision/PackageRevision/__init__.py b/exercicios/para-sala/Revision/PackageRevision/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/exercicios/para-sala/Room/data.json b/exercicios/para-sala/Room/data.json new file mode 100644 index 0000000..272e7ea --- /dev/null +++ b/exercicios/para-sala/Room/data.json @@ -0,0 +1,2 @@ +[{"name": "Beyonce", "age": 42, "city": "Houston Texas"}, + {"name": "Bruna", "age": 27, "city": "Sao Paulo"}] \ No newline at end of file diff --git a/exercicios/para-sala/Room/data.txt b/exercicios/para-sala/Room/data.txt new file mode 100644 index 0000000..dc1b41b --- /dev/null +++ b/exercicios/para-sala/Room/data.txt @@ -0,0 +1,5 @@ +Beyoncé +Jay-z +Blue +Rummi +Carter \ No newline at end of file diff --git a/exercicios/para-sala/Room/dataOne.txt b/exercicios/para-sala/Room/dataOne.txt new file mode 100644 index 0000000..89e5803 --- /dev/null +++ b/exercicios/para-sala/Room/dataOne.txt @@ -0,0 +1 @@ +End line. \ No newline at end of file diff --git a/exercicios/para-sala/Room/manipulation-arq.py b/exercicios/para-sala/Room/manipulation-arq.py new file mode 100644 index 0000000..b05dd73 --- /dev/null +++ b/exercicios/para-sala/Room/manipulation-arq.py @@ -0,0 +1,63 @@ +import csv +# with open("./data.txt", "r") as arq: #read +# content = arq.read() +# print(f"{content} - Teacher") +# line = arq.readlines() +# print(line[2]) + + +# with open("./dataOne.txt", "w") as arquive: +# arquive.write("End line.") + + +# data = [["name", "age"], ["Beyonce", 42], ["Bruna", 27]] + +# with open("people.csv", "w", newline= "") as arq_csv: +# writer_csv = csv.writer(arq_csv) +# writer_csv.writerows(data) + + +# with open("people.csv", "r") as arq: +# reader_csv = csv.reader(arq) +# for line in reader_csv: +# print(line) + + +import json + +# data = [{"name": "Beyonce", "age": 42, "city": "Houston Texas"}, +# {"name": "Bruna", "age": 27, "city": "Sao Paulo"}] + +# with open("data.json", "w") as arquive_json: +# json.dump(data, arquive_json) + +# with open("data.json", "r") as arquive_json: +# data = json.load(arquive_json) +# print(data) + +#Exercise + +# with open("./dataExerciseOne.txt", "r") as arq: #read +# content = arq.read() +# print(f"{content} - Bodecam") + + +# data = [{"Name": "Beyonce", "Age": 42, "City": "Houston Texas", "Profission": "Singer, Performer and Actor", +# "Resume": "American singer, songwriter, and businesswoman. Known as Queen Bey, she has been widely recognized for her boundary pushing artistry, vocals, and performances. Her contributions to music and visual media and her concert performances have led her to become a prominent cultural figure of the 21st century. She was named the eighth greatest singer of all time by Rolling Stone in 2023."}] +# with open("dataExerciseTwo.json", "w") as arquive_json: +# json.dump(data, arquive_json) +# with open("dataExerciseTwo.json", "r") as arquive_json: +# data = json.load(arquive_json) +# print(data) + + +data = [["Name", "Age", "Grade"], ["Beyonce", 42, 10], ["Bruna", 27, 10]] + +with open("dataExerciceStudants.csv", "w", newline= "") as arq_csv: + writer_csv = csv.writer(arq_csv) + writer_csv.writerows(data) + +with open("dataExerciceStudants.csv", "r") as arq: + reader_csv = csv.reader(arq) + for line in reader_csv: + print(line) diff --git a/exercicios/para-sala/Room/people.csv b/exercicios/para-sala/Room/people.csv new file mode 100644 index 0000000..c4a52f1 --- /dev/null +++ b/exercicios/para-sala/Room/people.csv @@ -0,0 +1,3 @@ +name,age +Beyonce,42 +Bruna,27