Welcome to SongTrivia!

--Originally published at Ken's Disciple 01

Picture by Pixabay Pixabay

 

Hi guys! i’ll try to upload a video of how our final project works but here are some pictures, me and Mauricio worked the whole semester in this project, we found a lot of difficulties since we are not professionals, but here’s how it looks:

Note: sad to say, this program only works on Mac, because the libraries we’re working with are not supported on windows.

Captura de pantalla 2017-05-03 a la(s) 15.09.39.pngCaptura de pantalla 2017-05-03 a la(s) 15.09.50.png

 


BANG!ana

--Originally published at Ken's Disciple 01

Picture by Pixabay Pixabay

Hi guys in this WSQ 11 Fabrizzio Cortez helped me a lot with his video.

Pretty much this are the steps:

  1. Import the library of fstream
  2. First function:  for loop where if i is smaller than the length then with the function to lower the program will change all the letters to lower case.
  3. Infinite loop that only stop if you break it and in this I find the number of bananas of each line, and the program saves that info.
  4. break: ends the infinite loop
  5. This function will return the number of bananas in each line
  6. Next function:  open the text file, read it and  made a counter that counts the accumulating bananas in each line of the text
  7. Finally in the int main: final counter, this will use the last functions and the return values will be returned.

 

Code:

Captura de pantalla 2017-05-02 a la(s) 18.23.31.png

Captura de pantalla 2017-05-02 a la(s) 18.23.44.png

Captura de pantalla 2017-05-02 a la(s) 18.23.53.png

Captura de pantalla 2017-05-02 a la(s) 18.26.56.png

Captura de pantalla 2017-05-02 a la(s) 18.23.16.png

Code at GitHub

L.out


TextFile.txt

--Originally published at Ken's Disciple 01

Picture by Unsplash Unsplash

 

It seems complicated, but it’s not.

Hi guys welcome to WSQ09 I’m going to show you how I found the way of doing this. Pretty much everything you need are functions that are already done with libraries, so It’ll be very easy once you try it. I’m going to give some links of things that helped me:

I’ll only change the name of my variables so you can compare with the pictures of my code:

  1. I included the fstream library ,so that I can read the file, and the string library so that I can use the getline function.
  2. Then I created my struct, I named it data and I declared my two integers that my function will return at the end, which are characters (the number of characters) and lines (number of lines).
  3. Then I created my function and I wrote data (to make reference to my struct) and then I named it result and in the parameters I wrote data(the struct)”&” w, which means that any variable that has “w.” will be directed to the struct.
  4. I declared my variables that the function will return (characters and lines).
  5. Then I declared the ifstream “file” and the name of my file in parenthesis which is “TextFile.txt”.
  6. Then I did an if loop and the condition was that if the file was open then i
    Captura de pantalla 2017-03-24 a la(s) 13.05.38.png
    Captura de pantalla 2017-03-24 a la(s) 13.05.55.png
    Captura de pantalla 2017-03-24 a la(s) 13.06.07.png
    Captura de pantalla 2017-03-24 a la(s) 13.05.27.png
    Continue reading "TextFile.txt"

Level up

--Originally published at Ken's Disciple 01

Use of comments, C++ good style coding, basic types, outputs, inputs, calling and creating functions, libraries, conditionals, nesting conditionals, loops, recursion, strings etc. Almost every mastery topics will be covered in WSQ08: yosoy196.

Now things got complicated, it’s time to demonstrate what you’ve learned and more. Ok guys I’ll try to explain everything but I recommend you to check Victoria’s post, she helped me and it’s thanks to her that I wads able to do this WSQ, her post is full of information, she made it in Spanish and her post is full of images that may help you to understand it better.

First of all you’ll have to download ken’s codebase so you may want to check the what do do task before, also pease check the videos in that page, they’ll help a lot.

  • You may want to also check the comments in the code to get a better idea of what to do.
  • Ken gave us 2 functions, we have to make them return what we want to: the first one called is_palindrome; is a bool function, so it has to return true if ‘n’ or whatever your variable is called is a palindrome (if you don’t know what a palindrome is this might help). the second function is called apply 196; and it has to return the sum of your number plus its inverse (Ex: if the number is 10 y has to return 10 + 01 = 11).

    *In this 2 functions we are working with strings, you may have noticed that there is a weird string thing in both functions, well that allows us to get the inverse of a number and since it’s a sting, we have to use the functions that are also included in the program, the ones that

    Captura de pantalla 2017-03-21 a la(s) 20.46.32.png
    Captura de pantalla 2017-03-21 a la(s) 20.46.47.png
    Captura de pantalla 2017-03-21 a la(s) 20.47.03.png
    Captura de pantalla 2017-03-21 a la(s) 20.55.38.png
    Captura de pantalla 2017-03-21 a la(s) 20.55.57.png
    Captura de pantalla 2017-03-21 a la(s) 20.56.25.png
    Continue reading "Level up"