Postagens

Mostrando postagens de novembro, 2017

Course C Initial 13rd – Loop Introduction

Imagem
Now I present to you a way that will easy our life. The loops! In others words, loop means repetition command. In C language we have tree loop types, they’re ‘do-while’, ‘while’ and ‘for’. What we’ll see is posts about them, and in the end of each post, we’ll make an activity to practice all knowledge. Well, that’s all folks and in the next lesson, we’ll see the ‘do-while’ command. So share with your friends. See you later folks!

Course C Initial 12nd – Exercises with Switch

Imagem
Now, do these Algorithms using switch command. 1- Make an algorithm that works as a game, it may ask to user “What’s United Kingdom Capital?” so the user will have available 4 possibility, they’re respectively a) Manchester, b) Newcastle, c) London, d) Liverpool, after will be tested them. Note: use for store the result, a character type variable. Case ‘c’, so printf (“You’re Wright”); default, so printf (“You’re wrong”); 2- Make an algorithm that reserves the product code and the quantity, so calculate the prices. Note: before defines how you can see below: ‘ M’ – Milk – U$ 1,00 1L. ‘ P’ – Potato – U$ 2,50 Kg. ‘ E’ – Meat – U$ 10,00 Kg. ‘ J’ – Juice – U$ 0,50 each. Use switch structure, for invalid values, use default to show a note at display. After multiple the price by quantity and print the total price. 3- Make an algorithm that works how a calculator. Use a char variable to store the operator and so make the operation and show

Course C Initial 11st – Switch Commands

Imagem
Switch is other way to selections commands, it test a variable integer or character, (it cans not use a float or double for example), with cases. See below its structure: Read the image. A switch command is use when we have a finite number of possibilities. In C, we can use switch how many time we desire. Other point is which switch allows breaks in the code. So see below breaks being running. As we can see, the case can use with breaks, since 1 to 7 for example. But it’s limited. Note: in Switch Command, we can’t test conditions as in if-else, so the form case 2<4 is invalid to switch. In case, never forget to put break; it’s the signal to the compiler that what’s inside case, had finished. In default, it’s not required. Now, see an alternative structure to switch command: That works, but it isn’t required. So I prefer use the previous way. Note: Switch and If Else can be interconnected, but be careful with this. I

Download: IF-Else Algorithms

Imagem
Here is the algorithms that is asked in  Lesson 10 About If-Else command. So, if you wish, you can make downloads of each question in Lesson 10. Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Question 7 Question 8 Question 9 Question 10 Note: if you use windows, you can include <stdlib.h> to use ‘system(“pause”);’, with this, you can pause the run up to user push enter. Well, that’s all Folks! See You Later!

NEWEST: Page to make Downloads

Imagem
I present for you a page to make download of algorithms. So, every time that be possible, will posted algorithms to you do download and practice. Well, that's all folks! See you later!

Course Python for Life 1

Imagem
Hello people! I present for you the newest course. Its name is Python For Life. This course will help you to learn this programming language. So, in this introduction, I’ll show to you some things about the language and in the next lesson, we’ll work with it. Now, a resume about Python programming language history. Python is a widely used high-level programming language for general-purpose programming , created by Guido van Rossum and first released in 1991. An interpreted language , Python has a design philosophy that emphasizes code readability (notably using white space indentation to delimit code blocks rather than curly brackets or keywords), and a syntax that allows programmers to express concepts in fewer lines of code than might be used in languages such as C++ or Java . The language provides constructs intended to enable writing clear programs on both a small and large scale. Python was conceived in the late 1980s, and its implementation began in

NEWEST!! Presentation – Course Python

Imagem
Is with a great honor that I present the newest course in this blog. Now we’ll study the Python programming language. With this course, you’ll have new horizons and possibilities, so share this newest with your friends and follow us by e-mail for reserves the newest. Subscribe us if you desire. So, see you later to study python language.

Course C Initial 10th – Exercises with If-Else

Imagem
Lesson 10. As we see in the previous lesson, now we’ll make some algorithms to practice. Those are 10 questions. I recommend that you make this algorithms because it’ll help you in the future. 1- Make an algorithm that reserves how tall is a person and test this conditions: If the Tall is greater than 1.90, printf (“You can play basketball”); If the Tall is smaller than 1.50, printf (“You’re not taller”); if the Tall is greater or equal to 1.50 and smaller or equal than 1.90, printf (“You’re between arrive”); 2- Make an algorithm that works as a game, it may ask to user “What’s the Spanish Capital?” so the user will have available 4 possibility, they’re respectively a) Madrid, b) Barcelona, c) Vigo, d) Sevilla, after will be tested them. Note: use for store the result, a character type variable. If the variable is equal to ‘a’, so printf (“You’re Wright”); Else, so printf (“You’re wrong”); 3- Make an algorithm that works as a table,

Course C Initial 9th – If-else Selection Command.

Imagem
Lesson 9. Note: for this lesson or the next, you need of all saw up to here. With all that we saw up to here, we can go on to an important thing when we’re programming. How can I use conditions in my code? Well, maybe I don’t run the code fully, so, what can I make? To answer those questions is that I present to you the study about Selections Commands in C language. There’s two selections commands in C, if-else and switch, we’ll see both. But now, we’ll see if-else. First understand the structure: if (condition is true) { #commands } Can you understand? The if command verified if the condition is true, if it’s, so run, else run other command if it there. Analyze the condition below: Else is for the moment that if is false. In some case, problems can be solved with else, it cans economize data. Make an algorithm that test 3 numbers typed by user and print the greater. For the test, will be used logical comman

Course C Initial 8th – Oder of Operations in Math.

Imagem
Lesson 8. Now, we’ll speak about math priority operators. For it, answer those questions. 1- Who will be first ran in this expression: 7+8/2x5= ? 2- What’s the result of 27+3x9=? 3- What’s the result of 7x25/5=? 4- What’s the result of -855+256-8524-5+8524=? 5- What’s the result of 7x(85*2/5)+89-4/2=? Just it. Below are the answers. Question 1: 27. Question 2: 54. Question 3: 35. Question 4: -604. Question 5: 325. This expressions is for show to you that there’s differences between math operators priority. Below, you’ll see a table which explain it. So, make this algorithms, if you need help, access the previous lessons, they could help you. So, let's go! Make an algorithm that sum a square root with a number typed by user, this number will be divided by 2 and summed with 4 multiplied by 2 and sum with square 7, so store in a variable. So, show at display. Make this algorithm, so, if you wished, make

Course C Initial 7th – Training with Math

Imagem
Lesson 7. Now, as promised in previous lesson, we’ll go to make some algorithms to practice all knowledge that we learned up to here. First: Make an algorithm that reserves 3 numbers by user and sum them, after show the result. For this, we first make the structure as showed below. How we can see, this is the basic structure of a software in C language. Now, we’ll create the variables for it: Okay, the variables was created. Now we’ll input the values for them with printf’s and scanf’s how you can see below: Note: always use return 0; in the end function. Now we’ll create a new variable called Result that will be the sum of Num1, Num2 and Num3 how you can see below. After we’ll print Result. That’s finished, we have an algorithm that calculates the sum between 3 numbers. Now, practice this algorithm, write and test yourself, test it change the math operators and joyful. You cou

Course C Initial 6th – Math Functions and Operators

Imagem
Lesson 6. Now we’ll see more about the math commands in C language. In some cases, they’re different. Below, we can see a table with the math functions, firs the simple operators, after we’ll see more. Now, I present to you other thing that can help you to solve problems. I present the math library. In C, it cans be used with this structure: First we include it: #include <math.h> Note: in this case, will be used two functions that is in math library, the pow and the sqrt. Pow – it’s for Exponentiation. Sqrt – it’s for Square Root. So, First show an algorithm that use the pow function: In the display: Now a code that calculates Square Root: In the display: I remember that is need you practice. Make this algorithms and practice always because this will help you to become each moment better than before. In the next lesson, we will make algorithms with all that was saw up to here. Well, that’s

Course C Initial – 5th Backslash Commands

Imagem
This is a short lesson, below you’ll can see a table with some commands with backslash. They’ll be used to organized the codes, back here always that you need. Well, that’s all folks! In the next lesson, we’ll see the mathematical functions in C language. See you later folks!