Create a program that asks the user for a word which will be your search word and the name of a file to open and search for that word. Then create a function that will receive two parameters (both string) representing those two data points. This function returns the number of occurrences of that word in that file. Here is the link to my GitHub.
Well kind of late but here are my codes from the partial exam, I will leave links for my codes in Github, hopefully you’ll find useful.
Write a function called triangles which receives a single parameter (int) which represents the size of a triangle. The function should print a triangle using loops (for or while). The only characters printed here are ‘T’ and the new-line character. The first line is length one, the middle line is length size and the last line is length one. Link to GitHub
Write a function called superpower that has two parameters of type long and returns a long which is first parameter raised to the power of the second, which is to say it returns a^b. Link to GitHub
Write a function called fibonacci which receives a long “n” and returns a long which is the value of the nth number in the fibonacci series which is: 0,1,1,2,3,5,8,13,21,34,55,89…………
So, fibonacci(0) would return 0. fibonacci(5) would return 5, fibonacci(8) would return 21.
Note that the first two fibonacci numbers are 0 and 1.
All others are the sum of the previous two fibonacci numbers. Link to GitHub
Write a function called isPalindrome which receives a string “x” and returns true if the string x is a palindrome, otherwise false. Lint to GitHub
Hello everyone! this WSQ is different, well kind of, what to d0:
Create a program that asks the user for 10 numbers. Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers. I found some very useful videos and tutorials:
Well finally this is the link for my code in GitHub.
Hi everyone! I know that i haven’t blog in a while but I’m back!
What to do?
Create a program that asks the user for a non-negative integer (let’s call that number n) and display for them the value of n! (n factorial). After showing them the answer, ask them if they would like to try another number (with a simple y/n response) and either ask again (for y) or quit the program and wish them a nice day (if they answered n).
Well first of all you need to instal some stuff, the big integer library, at least that was my case, here you have de link for the page BigInteger Library.
Also I recommend you to watch Ken’s video about this, this video is for the last semester, but it might help you.
Hi again!! Well this WSQ was easier than the last one, basically is the same as the WSQ03, so if you haven’t check it, you should, the difference this time is that you have to write a function for each calculation.
Hello my friends, today we are going to do a task that is very similar to the last ones, but a little more difficult, we are going to write a program that ask the user for a range of integer numbers and then prints the sum of the numbers in that range (inclusive).
We can use a formula but thats not the way that we are going to do it, first we have to decelerate variants, and the use “while” and “if”. Here are some grateful videos for your enjoyment.
And as always, the link for my code in GitHub and some evidence
Hi again!! honestly this task was a little difficult, I had to do some research for this WSQ, and i found some great videos that I leave here. The WSQ consist in creating a program that ask the user a random number between 1 and 100, the user have to guess and the program won’t stop running until you get the right number, but the machine give you hints and the number of attempts.
Hello!! the task of today was simple, you have to declare variants, also you have to use “if” and “else”, the program will ask you for the temperature in fahrenheit and then the computer will calculate the temperature in celsius with this formula: C = 5 ∗ (F − 32)/9. As an addition of this task, you have to manipulate the code until the computer tell the user if the water boils at the temperature given (under typical conditions), here is an example:
If you don’t know how to use “if” and “else” here are some videos, it might be useful.
Hello my friends!! Today I´m going to talk about a little bit about flipped learning and what I think about it.
First of all, the flipped learning (as the name suggest) is different than the usual method of learning, in the flipped learning method you don’t have pressure and you have to learn by yourself, the pressure is as much as you want, I will leave some videos and links with more information:
In my opinion (and experience) I think is a good method, in fact I think is better than the usual method, but you need to be very responsable, because the teacher won’t teach you, yeah probably the teacher will help when you don’t understand, but the flipped learning is learning by your self, that is ok, I guess.
Hello everyone!! This WSQ was simple, all about variables, the task is to ask the user for two integer numbers and calculate the following instructions:
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 remainder of integer division of the two numbers.
If you search in youtube or google, you can find various examples about this, most of them are in english, but are very helpful, I will leave some ones here.