From c0b697730b9f4fd0ce750415b49ee88a3cc5f057 Mon Sep 17 00:00:00 2001 From: MateoDufra Date: Wed, 20 Sep 2023 20:04:14 +0200 Subject: [PATCH 1/5] Here my work --- week_0/ex_0_beginner/ex_0_beginner_submit.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/week_0/ex_0_beginner/ex_0_beginner_submit.txt b/week_0/ex_0_beginner/ex_0_beginner_submit.txt index b4d44a7..ebddb0d 100644 --- a/week_0/ex_0_beginner/ex_0_beginner_submit.txt +++ b/week_0/ex_0_beginner/ex_0_beginner_submit.txt @@ -1 +1,3 @@ -Copy and paste output of ex_0_beginner_runfile.py below: +Copy and paste output of ex_0_beginner_run file.py below: +print("\n"+"Hello Nathaniel, I'm Matéo a first year CARe student. I'm a French student from Bordeaux !!! (really pretty city by the way).\nI don't really have a precise goal for your courses, I just want to improve globally my skills because I'll like to specialised in Imaging.") +print("\n"+"Never I think, I'm just young... technology is everywhere nowadays") \ No newline at end of file From 03956cc20e51cb9f9713e972168a15acd34a7e72 Mon Sep 17 00:00:00 2001 From: MateoDufra Date: Thu, 21 Sep 2023 18:49:32 +0200 Subject: [PATCH 2/5] Here my work --- week_0/ex_0_beginner/ex_0_beginner_submit.txt | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/week_0/ex_0_beginner/ex_0_beginner_submit.txt b/week_0/ex_0_beginner/ex_0_beginner_submit.txt index ebddb0d..0f3c335 100644 --- a/week_0/ex_0_beginner/ex_0_beginner_submit.txt +++ b/week_0/ex_0_beginner/ex_0_beginner_submit.txt @@ -1,3 +1,28 @@ -Copy and paste output of ex_0_beginner_run file.py below: -print("\n"+"Hello Nathaniel, I'm Matéo a first year CARe student. I'm a French student from Bordeaux !!! (really pretty city by the way).\nI don't really have a precise goal for your courses, I just want to improve globally my skills because I'll like to specialised in Imaging.") -print("\n"+"Never I think, I'm just young... technology is everywhere nowadays") \ No newline at end of file +The Zen of Python, by Tim Peters + +Beautiful is better than ugly. +Explicit is better than implicit. +Simple is better than complex. +Complex is better than complicated. +Flat is better than nested. +Sparse is better than dense. +Readability counts. +Special cases aren't special enough to break the rules. +Although practicality beats purity. +Errors should never pass silently. +Unless explicitly silenced. +In the face of ambiguity, refuse the temptation to guess. +There should be one-- and preferably only one --obvious way to do it. +Although that way may not be obvious at first unless you're Dutch. +Now is better than never. +Although never is often better than *right* now. +If the implementation is hard to explain, it's a bad idea. +If the implementation is easy to explain, it may be a good idea. +Namespaces are one honking great idea -- let's do more of those! + +Hello Nathaniel, I'm Matéo a first year CARe student. I'm a french student from Bordeaux !!! (really pretty city by the way). +I don't really have a precise goal for your courses, I just want to improve globally my skills cause I'll like to specialised in Imaging. + +Never I think, I'm just young... technology is everywhere nowadays + +Process finished with exit code 0 \ No newline at end of file From 22a6231bc668b19960a6cca15916fc643021efc4 Mon Sep 17 00:00:00 2001 From: MateoDufra Date: Wed, 27 Sep 2023 16:45:53 +0200 Subject: [PATCH 3/5] Here my work --- week_0/ex_0_beginner/ex_0_beginner_submit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week_0/ex_0_beginner/ex_0_beginner_submit.txt b/week_0/ex_0_beginner/ex_0_beginner_submit.txt index 0f3c335..67c380c 100644 --- a/week_0/ex_0_beginner/ex_0_beginner_submit.txt +++ b/week_0/ex_0_beginner/ex_0_beginner_submit.txt @@ -25,4 +25,4 @@ I don't really have a precise goal for your courses, I just want to improve glob Never I think, I'm just young... technology is everywhere nowadays -Process finished with exit code 0 \ No newline at end of file +Process finished with exit code 0 From cac3e23ecd5bb9c324c1f7ff1fb655fb11974423 Mon Sep 17 00:00:00 2001 From: MateoDufra Date: Wed, 27 Sep 2023 17:37:31 +0200 Subject: [PATCH 4/5] Here my work --- week_0/ex_0_advanced/ex_0_advanced_runfile.py | 11 ++++++++++- .../ex_0_intermediate/ex_0_intermediate_runfile.py | 12 +++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/week_0/ex_0_advanced/ex_0_advanced_runfile.py b/week_0/ex_0_advanced/ex_0_advanced_runfile.py index ca4c2ba..7b29e7f 100644 --- a/week_0/ex_0_advanced/ex_0_advanced_runfile.py +++ b/week_0/ex_0_advanced/ex_0_advanced_runfile.py @@ -1 +1,10 @@ -#YOUR CODE FOR EX_0 ADVANCED HERE \ No newline at end of file +#YOUR CODE FOR EX_0 ADVANCED HERE +Floup = input("Put your DNA sequence here : \n") +DNA= Floup.upper() +LDNA = len(DNA) +A = DNA.count("A") +G = DNA.count("G") +C = DNA.count("C") +T = DNA.count("T") +GC = ((G+C)/LDNA)*100 +print("The length of the DNA sequence is %d long.\nThere is %d Adenine, %d Guanine, %d Cytosine and %d Thymine.\nThe GC content is about %.2f" %(LDNA,A,G,C,T,GC)) \ No newline at end of file diff --git a/week_0/ex_0_intermediate/ex_0_intermediate_runfile.py b/week_0/ex_0_intermediate/ex_0_intermediate_runfile.py index 919a326..9d2fa32 100644 --- a/week_0/ex_0_intermediate/ex_0_intermediate_runfile.py +++ b/week_0/ex_0_intermediate/ex_0_intermediate_runfile.py @@ -1 +1,11 @@ -#YOUR CODE FOR EX_0 INTERMEDIATE HERE \ No newline at end of file +#YOUR CODE FOR EX_0 INTERMEDIATE HERE + +import math + + +ICount = float(input("Input the initial count : \n")) +FCount = float(input("Input the final count : \n")) +Time = float(input("Input the time : \n")) +GRate = (math.log(FCount) - math.log(ICount)) / Time + +print("The growth rate is : ", GRate) From fa4299c7c8a122c2ef4f1d9d0485e5d56e8a5276 Mon Sep 17 00:00:00 2001 From: MateoDufra Date: Thu, 5 Oct 2023 23:21:51 +0200 Subject: [PATCH 5/5] Here my work --- week_1/ex_1_beginner/ex_1_beginner_submit.txt | 29 +++++++++++++++++++ .../ex_1_intermediate_submit.txt | 28 ++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/week_1/ex_1_beginner/ex_1_beginner_submit.txt b/week_1/ex_1_beginner/ex_1_beginner_submit.txt index 5dfc523..aa9e49e 100644 --- a/week_1/ex_1_beginner/ex_1_beginner_submit.txt +++ b/week_1/ex_1_beginner/ex_1_beginner_submit.txt @@ -1 +1,30 @@ Copy and paste output of ex_1_beginner_runfile.py below: +#YOUR CODE FOR EX_1 BEGINNER HERE + +# Define a list of microbial population counts for five consecutive days +MicrobPop = [] +Up =[] +NbDays = 6 +for Day in range(1, NbDays): + Pop = int(input("Enter the population number for day %d : "%(Day))) + MicrobPop.append(Pop) + if Pop > 200 : + Up.append(Day) + +# Calculating the average population +Average = sum(MicrobPop) / len(MicrobPop) +print(f"Average population count: {Average}") + +# Calculating the maximum population +MaxPop = max(MicrobPop) +print(f"Maximum population count: {MaxPop}") + +# Calculating the minimum population +MinPop = min(MicrobPop) +print(f"Minimum population count: {MinPop}") + +# Print the final list +print("The Microbial population for each day: ",MicrobPop) + +# Print the days that exceed a pop of 200 +print("The day that exceed a population of 200 are: ",Up) diff --git a/week_1/ex_1_intermediate/ex_1_intermediate_submit.txt b/week_1/ex_1_intermediate/ex_1_intermediate_submit.txt index 66cbfd4..1a52610 100644 --- a/week_1/ex_1_intermediate/ex_1_intermediate_submit.txt +++ b/week_1/ex_1_intermediate/ex_1_intermediate_submit.txt @@ -1 +1,29 @@ Copy and paste output of ex_1_intermediate_runfile.py below: + +# I defined the initial dictionary +species = {"Bacteria": 20, "Archaea": 15, "Fungi": 10} + +# Loop to calculate and show the number of total samples +samples = sum(species.values()) +print(f"Total samples: {samples}") + +# Function to add a new item to the dictionary or increase its count if it doesn't exist +def add(species_dict, name): + if name in species_dict: + species_dict[name] += 1 + else: + species_dict[name] = 1 + +while True: + new= input("Enter a new species name (or 'stop' to quit):\n") + if new.lower() == 'stop': + break + else: + add(species, new) + +# To test if each species have a value greater than 15 +species_greater_than_15 = [species for species, count in species.items() if count > 15] +print(f"Species with sample counts greater than 15: {species_greater_than_15}") + +# Show the updated dict +print("Updated Microbial Species Dictionary:\n",species) \ No newline at end of file