comp-think / 2023-2024

The GitHub repository containing all the material related to the Computational Thinking and Programming course of the Digital Humanities and Digital Knowledge degree at the University of Bologna (a.a. 2023/2024).
14 stars 0 forks source link

Lecture "Algorithms", exercise 3 #6

Open essepuntato opened 11 months ago

essepuntato commented 11 months ago

The previous chapter, entitled “Introduction to Computational Thinking”, illustrates two different algorithms, expressed in natural language, for implementing the Fibonacci function. Create two distinct flowcharts to implement both of them.

vattelalberto commented 11 months ago

image

image

katyakrsn commented 11 months ago

1)

1

2)

2
frammenti commented 11 months ago

Fibonacci1 Fibonacci2 drawio Fibonacci3 drawio

saramadonia commented 11 months ago

flowchart 1_page-0001 flowchart 2_page-0001

qwindici commented 11 months ago

fibonacci1 (1) fibonacci1

rufferbaraldi commented 11 months ago

Rubens drawio Rubens2 drawio

CarlaMenegat commented 11 months ago

Fibonacci sequence 1 Captura de Tela 2023-10-15 às 12 16 31 Fibonacci sequence 2 Captura de Tela 2023-10-15 às 12 45 53

ThIheb commented 11 months ago

Problem 1 Problem 2

valentinabertelli commented 11 months ago

flowchart 1 flowchart

FranciscoWu commented 11 months ago

image image

elena2notti commented 11 months ago

es2

Liber-R commented 11 months ago

Diagramma senza titolo drawio

Fibonacci natural language second description flowchart

Chiaramartina commented 11 months ago
Schermata 2023-10-16 alle 17 26 41
csalguero10 commented 11 months ago
Captura de pantalla 2023-10-16 a la(s) 8 18 13 p m Captura de pantalla 2023-10-16 a la(s) 8 18 44 p m
MariaFrancesca6 commented 11 months ago

Fibonacci_1 Fibonacci_2

alicepiazzi commented 11 months ago
Schermata 2023-10-17 alle 09 30 47 Schermata 2023-10-17 alle 09 40 47
valetedd commented 11 months ago

image image

enricabruno commented 11 months ago

Lecture__Algorithms-ex3-a Lecture__Algorithms_-ex3-b

simocasaz commented 11 months ago

IMG_20231017_182836.jpg

IMG_20231017_183004.jpg

VirginiaDa00 commented 11 months ago

IMG_20231017_205029

Asemica-me commented 11 months ago

Fibonacci algorithm num.1

The function for calculating the nth Fibonacci number takes as input an integer “n”. If “n” is less than or equal to 0, then 0 is returned as a result. Otherwise, if “n” is less than or equal to 2, then 1 is returned. Otherwise, in all the other cases, associate the value “1” to two distinct variables “a” and “b”. Then, repeat the following operations indefinitely until a value is returned. Set the variable “c” as the sum of “a” plus “b”. If “n” is less than or equal to “3” then return “c”, otherwise assign the value of “b” to “a” and the value of “c” to “b”, and finally decrease the value of “n” by 1 before repeating.

1diag

Fibonacci algorithm num.2

The function for calculating the nth Fibonacci number takes as input an integer “n”. If “n” is less than or equal to 0, then 0 is returned as a result. Otherwise, if “n” is equal to 1, then 1 is returned. Otherwise, return the sum of the same function with “n-1” as input and still the same function with “n-2” as input.

Untitled Diagram (1)

essepuntato commented 11 months ago

Hi all, thanks for your takes. Just a few notes:

NiccoloMolinati commented 11 months ago

I know I'm late considering the assignment was due yesterday, but I still wanted to share! Screenshot 2023-10-17 020857 modificato

Screenshot 2023-10-19 015624

Theengwar commented 11 months ago

1st: comp-think 02 Ex03a NFKH

2nd: comp-think 02 Ex03b NFKH

addonico commented 9 months ago

exercise 3-1 exercise 3-2

alichpova commented 2 months ago

F1 Fibonacci drawio

alichpova commented 2 months ago

F2 Fibonacci drawio