Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/feed-rss2.php on line 8
‘Multimedia’ Articles at TC101 Fall 2015 https://kenscourses.com/tc101fall2015 Introduction to Programming Python and C++ Thu, 26 Nov 2015 05:19:35 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ Nesting of conditional IF statements. https://kenscourses.com/tc101fall2015/2015/nesting-of-conditional-if-statements/ Thu, 26 Nov 2015 05:19:35 +0000 http://myfreakingcrazythoughts.wordpress.com/?p=418 Continue Reading →]]> In C++ the braces of and if or an else clause can contain another if statement. There are known as nested if statements.

In simple terms a nested if is when you write an IF inside another IF braces.

This is the basic structure of a nested if.

if( boolean_expression 1)
{
   // Executes when the boolean expression 1 is true
   if(boolean_expression 2)
   {
      // Executes when the boolean expression 2 is true
   }
}

 

And of course we can nest else if in the similar way as you nest the if statement.

This is an example of a program with nested if-else.

#include <iostream>
using namespace std;
 
int main ()
{
   int marks = 55;
   if( marks >= 80) {
      cout << "U are 1st class !!";
   } 
   else {
      if( marks >= 60) {
          cout << "U are 2nd class !!";
      }  
      else {
	if( marks >= 40) {
  	  cout << "U are 3rd class !!";
	}
	else {  
	  cout << "U are fail !!";
        }		  
      }
   }
   return 0;
}

 

And this will be the output:

U are 3rd class !!

 

-The Admin.

]]>
https://creativecommons.org/licenses/by/4.0/
BONUS POINTS! https://kenscourses.com/tc101fall2015/2015/bonus-points-6/ Thu, 26 Nov 2015 04:53:46 +0000 http://myfreakingcrazythoughts.wordpress.com/?p=404 Continue Reading →]]> Well this is a video of myself talking about my experience in Flip learning and how to be succesful in the subject.

I really had a great time with Ken as my teacher and his way of teaching is incredible! I had never been on a class where I feel like the teacher was actually my friend and he helped us a lot through our way in the course.

I highly recommend a flipped class room and even more if you have the opportunity to be with Ken Bauer, he is one of the best teachers that I ever had.

Thanks Ken!

-The admin, Esaú.

PS: Here is the video.

]]>
https://creativecommons.org/licenses/by/4.0/
Euclids Algorithm https://kenscourses.com/tc101fall2015/2015/euclids-algorithm/ Sun, 22 Nov 2015 00:39:10 +0000 http://myfreakingcrazythoughts.wordpress.com/?p=182 Continue Reading →]]> In this WSQ I had to write a code in which I could use the already known Euclids Algorithm to find the Greatest Common Divisior of two numbers that will be asked to the user.

Euclids Algorithm:

The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, 21 is the GCD of 252 and 105 (252 = 21 × 12 and 105 = 21 × 5), and the same number 21 is also the GCD of 105 and 147 = 252 − 105.

Here is the code of the program.

#include <iostream>
using namespace std;

int gcd(int a, int b){//Making the function
	int g=a;
	int h,l;
	int f=2;
	if(a==0){
		return a;
	}
		while(g>0){//Doing a loop
		if(g==0){
			goto exit;
		}
		g=a%b;
		a=b;
		b=g;
		}
	if (l=1000){
	exit:
	g=a;
	}
	return g;
}

int main(){
int a, b;
cout<<"Please introduce the first number"<<endl;
cin>>a;
cout<<"Please introduce the second number"<<endl;
cin>>b;
cout<<endl;

cout<<"Your Greatest Common Divisor is: "<<gcd(a,b)<<endl;

return 0;
}

 

Also, Here is the link to the code in Github: BATMAN.

And of course, as always, the picture of the execution of the program on Cygwin.

Euclids execution

-The Admin.

 

]]>
https://creativecommons.org/licenses/by/4.0/
HELLO WORLD on C++ https://kenscourses.com/tc101fall2015/2015/hello-world-on-c/ Wed, 19 Aug 2015 22:42:03 +0000 http://myfreakingcrazythoughts.wordpress.com/?p=29 Continue Reading →]]> My first assignment for TC101 was about programming a “Hello World” on C++.

Well, the programs that I used were Atom to write the codes and Cygwin to compile them.

Also, I saw a tutorial from my teacher, Ken Bauer, who explains clearly the whole process of creating this little program.

I will let you the links of the video tutorial, the codes that you will need and of course I will tell you where you can download Atom and Cygwin completly free!

Here are the programs that you will need:

Atom.  Cygwin.

And Over here is the VideoTutorial!

Hello World C++ Video Tutorial by Ken Bauer

And, here is the link to the TLC101 hastag that will link you to all our twitter publications about this Programming Course.

#TC101

PD:

Here are my own codes and the execution of the program in Cygwin and Clicking HERE you will find them on my GIthub Account! 

Hello World

Hello World Execution

]]>
https://creativecommons.org/licenses/by/4.0/