In Drracket Program; Fibonacci Series, Factorial Concept and Signal Function To Define The Concepts

in #utopian-io7 years ago (edited)

DQmdwkrPLLkC9pjbjHfNfXEo8Sje56wDLwHaAj4W7C5dF7p.png


What Will I Learn?

  • Fibonacci Series

  • Factorial Concept

  • Signal Function

Requirements

  • Drracket Program

  • Racket Programming Language

Difficulty

  • Intermediate

Tutorial Contents

In Drracket Program;Using Racket programming language, we will learn to define '' Fibonacci sequence '', '' Factorial concept '' and '' Sign function ''. We will make examples from concepts we have learned their definitions.

Curriculum

List of previous lessons;

Requirement in the Latex program is sufficient, necessary and sufficient condition, and the use of the negative of the proposals. Also commands for using pi and ksi symbols

The use of small and large symbols and types and the large x symbol in the Latex program.

Geogebra Programında Çokgen,Doğru,Doğru Parçası ve Kesiştir Komutlarının Düzlemde Kullanımı

  • "Fibonacci Series" in mathematics science

Fibonacci-series-java-vertex-academy-1.png

source

is defined as. The first and second terms are 1. To find the third term; the first and second terms are added. To find the fourth term; the second and third terms are added. It goes on forever, going on like this. In Drracket program;

(define (fibonacci n)
         (if (= n 1 ) 1
         (if (= n 2 ) 1
         (+ (fibonacci (- n 1))
             (fibonacci (- n 2))))))

let is define it as. Let's find out 15 terms in this series.

1.png


The program found the 15th term as 610. In this way, we can find the terms we want.

  • The concept of factorial is defined as the multiplication of numbers from 1 to n in mathematical science. The concept of factorial

1x2x...xn=n!

is defined as. Drracket program; Let's define the concept of factorial as follows.

(define (fact n) ( if (= n 0) 1
                      (* n (fact (- n 1)))))

For example; Calculate 10 factorial programs.

2.png


10 factorial value '' 3628800 ''. This method can be calculated in other factorial values.

  • In mathematical science, the sign function is defined as in the picture.

math-sgn-function-in-cpp.jpg

source

In Drracket program; Let's define the sign function.

(define (sign x)
  (cond
    [(> x 0) 1]
    [(= x 0) 0]
    [(< x 0) -1]))

Now let's do the calculation for positive real number value, negative number value and zero value. For example, let's look at the values for 15 positive real number values, -100 negative real number values, and zero real numbers.

3.png


As defined in the sign function; 15 for positive real number value 1, -100 negative real number value -1 and zero value for zero real number. Used in mathematical science; I learned to use 'Fibonacci Series', '' Factorial Concept '' and '' Sign Function '' in Drracket program.

GitHub Link



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Violated Rule:

  • Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.

My Opinion:

  • A tutorial must be informative and explanatory, but also "tutor". This tutorial lacks "tutor"ing, and it is nothing more than an explanation of a documentation.

  • Of course, you can show how to's about mathematical concepts. But if I approve you for this work, it would be unfair to others. Next time, please include more than one concept to make it look satisfying. Also, don't try to re-explain the concepts which are already explained in programming languages documentation. Adding examples does not change anything.

You can contact us on Discord.

[utopian-moderator]

I'm looking good contributions from you, Emre. Make me proud. :)

Thank you for your lovely comment. I will try to produce good projects.

Hey @yokunjon, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

@matematikciemre, Upvote is the only thing I can support you.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63267.39
ETH 2572.65
USDT 1.00
SBD 2.80