#Quiz03

--Originally published at Solving Problems with Programming

PICTURE OF AUTOR

THIS IS THE #QUIZ03 WHOSE OBJECTIVE IS CREATE AND CALL FUNCTIONS TO DO DIFFERENT TASKS AT DIFFERENT TIMES. COVERING #MASTERYTOPIC06 #MASTERYTOPIC07 .

This #QUIZ03 makes a main routine that asks the user for a number and then calls your functions to calculate the square and cube roots of that number and prints them out. And if the number given is negative. It is going to print the cube root number but in the square root it will tell the user that the number given for that root is IMAGINARY! (#Mastery11).

FIRST TO DO THIS #QUIZ03 I HAVE TO USE THE LIBRARY FOR THE COMMANDS OF MATH THAT WOULD BE SQRT FOR SQUARE ROOT AND CBRT FOR THE CUBE ROOT AND I FOUND THE NAME OF THE LIBRARY IN THE BOOK OF THE COURSE THAT IT IS CALLED #include<cmath>:

library

Link of the book that told me the name of the math library: How to Think Like a Computer Scientist C++ Version by Allen B. Downey.

And also for the name of the commands i used for information this link: function <cmath> cbrt and this link: function <cmath> sqrt

cube2

PICTURE OF AUTOR

funx

PICTURE OF AUTOR

SO AT FIRST THING YOU DO THE SAME AS OTHER PREVIEW CODES DECLARATE YOUR TYPE OF VARIABLE AND YOUR VARIABLE AND ASK THE USER TO GIVE YOU A NUMBER.

AFTER THAT YOU HAVE TO CALL YOUR CREATED FUNCTIONS THAT WERE:

  • double square_root(double x) {}  // returns the square root of x
  • double cube_root(double x) {} // returns the cube root of

YOU HAVE TO KNOW THAT USING THESE 2 FUNCTIONS IS OTHER EXTERNAL FUNCTIONS FROM THE MAIN THAT HAS A DOUBLE FUNCTION VALUE OF 64 BITS AND DECLARING A DOUBLE VARIABLE X INSTEAD OF USING THE VOID MAIN THAT HAS 0 BITS.

TO CALL THE FUNCTION IN THE MAIN

new
Continue reading "#Quiz03"

Post of the week #2 what things i learned in this week #2 ?

--Originally published at Solving Problems with Programming

Picture of the author.

First let me tell you that in my last week post i learn all transversal topics that are:

  • Ability to create C++ file and run from command line (terminal)
  • Create accounts: Blog, Twitter, GitHub
  • Submit work via Blog RSS and GitHub
  • Demonstrate use of Linux sufficient for quizzes/exams
  • Install Linux on their own computer

And I explained it in my post: Post of the week #1 what things i learned in this week #1 ?

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing

In this week i learned more mastery topics besides of the mastery ones i learnt from last week. I learned these mastery topics:

#Mastery01 #Masterytopic01 #MasteryTopic01 #MASTERY01 #MASTERYTOPIC01 that i talked in my blog: #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp

In this week i learned the #Mastery02 #Masterytopic02 #MasteryTopic02 #MASTERY02 #MASTERYTOPIC02 that is C++ Good Style coding conventions. I achieve this mastery arranging the spaces between the sentences of my code and also by doing plugins for my c++ codes after my teacher give me this feedback:

ken.png

With this link Code »Posting Source Code i used this part of code to use while posting my c++ code in a better way on my last post #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp . The code i used for it is this:

plugin2

Link of image: Code »Posting Source Code

While you are going to publish your code on C++ in the wordpress editing page you need to copy paste this short code and change the extension of the code, instead of “css” will be the

plugin3
c3
Continue reading "Post of the week #2 what things i learned in this week #2 ?"

Fourth Class and First Quiz (19/01/17)

--Originally published at Solving Problems with Programming

Link of the Picture: Link of the picture

In this fouth class i learn one transversal topic in mastery topics  that is using platforms such as socrative (link) and kahoot (link) for taking quizzes. With these quizzes i reaffirmed that the language C++ is a compile language because it needs a compiler to run like the terminal we use for coding with the text editor.

tumblr_mm7wirs80b1snsa9ro1_1280

Link of the image: Link of the picture

socrative-logo-hires

Link of the picture:Link of the picture

And i also learnt and reaffirmed that the word for representing all kinds of numbers in C++ is integer and NOOOOT!!! float. (2!=2.0000)

number

Link of the picture:Link of picture

fun-numbers-23514002

Link of picture: Link of picture

 


#WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp

--Originally published at Solving Problems with Programming

Link of the picture:Link of the picture

So in this third class that i had on last Monday we started how to play with numbers and make a program for it in C++. If you need making a program using this techine in C++ check my last post: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp .

What i did for this numeric program is solving the problem to the user by asking the user for two integer values, then use those two values to calculate and show the following:

  • The sum for the two numbers
  • The difference of the two numbers
  • The product of the two numbers
  • The integer based division of the two numbers (so no decimal point). First divided by second.

The following photograph shows the solution to this problem:

fun-with-numbers

Picture of Author.

So at first i wrote the same structure of the program just did the same as what i did in Hello World: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp where i explained the application of the #MasteryTopic01 that it is for comments that could be very useful when debugging and #MasteryTopic04 that is basic output for data.

What i first put in the code was the library <iostream> to call all the fuctions of inputs and outputs of data in languague C++ #MasteryTopic06 Calling Functions and #MasteryTopic08 Importing and using libraries.

va

Then i had to write a command that everytime goes with the instructions of input and outputs of data that is call std but with this command helps writing these std out of the main because the machine factorizes them.

After that i had to declarate different basic types of variables in decimal and whole values for using in the math

basicsvariable
c3
va
eee
f
remainder
Continue reading "#WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp"

My Project For the Course TC1017 and Expo Ing

--Originally published at Solving Problems with Programming

What I am going to do for my Project is an automated lock or smart lock (smart lamp) that can be wireless opened it by a smart device from a long distance but also control it with a physical switch. So I am going to do this because it gives a solution to a problem i experienced while working for a company. When was the time for eating and returned to the building i had to wait a long time to someone opening me the door turning an electric lock with just a physical switch because they were eating and the physical switch was just too far for them. Also with the clients  someone had to open the door to touch the physical switch and opened the door and i think it does not have to be like this. So that are the reasons why i am going to do this optomized project and i want to presented it in Expo Ing.

How Am I going to do this project?

To succeed for this project I am going to do a system control programming 2 microcontrollers (A microcontroller is a integrated circuit device who controls outputs like the lock in fuction of inputs in this case the switches) in languague C with open source software called Arduino where these controllers are going to read the inputs between the smart device and the physical switch and decide whether of those can open or close the electric lock. Therefore I am going to follow this diagram i designed:

xor-automatico

moc3011

At first I am going to build this circuit i designed where it has the physical switch that utilizes Altern Current of 127 Volts of AC and the microcontroller utilizes Direct Current of 5 VCD so the diagram converts the altern current of 127VAC to direct

hc05
head
appinventor-diagrama-1
app
app-language-blocks
app-language-blocks2
xor
Continue reading "My Project For the Course TC1017 and Expo Ing"

Post of the week #1 what things i learned in this week #1 ?

--Originally published at Solving Problems with Programming

Passing just a first week in this course i learn how to create C++ file and run from command line (terminal) with the help of these tutorials videos First Tutorial Hello World 12/01/17  and #TC1017 Second Class Hello World 12/01/17 !! :

hello-world

You can see all the things inside my last post: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp

I learnt how to create a blog account with the help of my teacher and this video tutorial i saw Como Crear Blog En WordPress Gratis 2016 | Actualizado Y Paso A Paso:

blog

You can see all the things i learned inside my first post:First Class, First Blog (Blog of the first class 9/01/17)

I learnt how to create a Twitter account working with the team of #TC1017:

twiteer

I learnt how to create a GitHub account with the help of this tutorial GitHub GUI based Tutorial for my courses :

giy

giy2

This is the link for my GitHub account:Fabrizzio GitHub Account

With these photographs shown above it tells me that i learn how to submit codes via Github and posts via Blog RSS of the course:

submit

I learnt how to use comments on my code:

atom-hello

I learnt how to install a software pretty similar with Linux for windows 10 called ubuntu for windows on my own computer with the help of my teacher who gave a link called How to Install and Use the Linux Bash Shell on Windows 10 and also explain of my first post First Class, First Blog (Blog of the first class 9/01/17):

 

downloading-ubuntu3

I learnt how to book and contact my teacher with the help of this video tutorial How to find Ken’s Office 2016 edition and the booking page Reserve time with Ken Bauer:

ken-office

reserve-bauer

 


Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp

--Originally published at Solving Problems with Programming

helloworld

So in this class that i had on last Thursday we started how to enter the wonderful world of coding and writing in C++. To make a program using this techique in C++ you need 2 things:

  1. A hackable Text Editor for the 21st Century
  2. A Terminal

The Text Editor is the tool where you can write and save YOUR PROGRAM in C++ with the extention in .cpp. The Terminal is the tool which shows the user to manage and see all the input and output data (101010101) compiling the information given from the text editor (C++).

In my last post I talked about the terminal that i am using called ubuntu in windows 10 where i installed with the help of my teacher who gave me a link in First Class, First Blog (Blog of the first class 9/01/17) and in this second class the teacher recommended to me and the class to use the text editor that was missing to getting started with coding our first code call the famous Hello World in C++.

The Text Editor I will be using for the class is called Atom where you can download it to any kind of operative system like windows or mac at this link https://atom.io/ where is the official website and where io stands for input and output of data:

atom2

atom

After installing atom i created a new C++ file and when i saved in a C++ file with the extention .cpp, the code turn out in colors like in this picture:

atom-hello

After that i open my terminal ubuntu but i wrote at first the command for compile (compile is the action of transforming any kind of languague to machine languague that only is 1 or 0 1010101010101110)  and the software needed it to install a package of fuctions and

firsr-error
hello-world
Continue reading "Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp"

First Class, First Blog (Blog of the first class 9/11/17)

--Originally published at Solving Problems with Programming

Hello World of solving problems with programming!!!

#TC1017

I am going to talk about the first class of this week where i saw a new innovative introduction of this course. I saw a creative Page One of the course.

I learnt how to create my tweeter account that i will be using for communication for our teacher and after that i had some questions on how to create a blog account until I booked a meeting with the teacher ken bauer.

In the first class i showed the teacher of a project that i have been working for months that it answers a problem that i have experienced but i am gonna to talk about it in another blog as my project for the course.

The teacher told us that the language we will be using for this course #TC1017 is a simple environment of C++ but on my blogs and i am going to combine it with my knowledge of C++ and the many other applications that can have.

In this first class the teacher gave me a web page or link How to Install and Use the Linux Bash Shell on Windows 10 where i could download the tool for the environment i will be using for the course because i have windows 10 and the teacher gave me the chance of installing a kind of the environment of linux on my windows operating system that it is called bash en ubuntu en windows. I read this link and i posted on my twiteer account the progress. Here are the photograhps of that progress:  downloading ubuntu3.png

 

downloading bosh.png

On my next blog i will talking about my second class, the terminal and the text editor where you can write de C++ code and what resources i need it. Therefore the

Continue reading "First Class, First Blog (Blog of the first class 9/11/17)"