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
‘#Quiz7’ Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Tag Archives: #Quiz7

Quiz 7

https://github.com/estebanpinal/WSQ/blob/master/quiz7

QUIZ 7

#QUIZ7https://github.com/ricardonewton/TC101/blob/master/fibonaccihttps://github.com/ricardonewton/TC101/blob/master/palindrome

QUIZ7

P1.- #Jorge Fernando Saldaña Cabal #A01350730 import math def distance(x1,y1,x2,y2): z1=x1-x2 z1=z1**2 z2=y1-y2 z2=z2**2 res=math.sqrt(z1+z2) return(res) def main(): x1=int(input(‘Type x1: ‘)) y1=int(input(‘Type y1: ‘)) x2=int(input(‘Type x2: ‘)) y2=int(input(‘Type y2: ‘)) print(‘The distance between those points is: ‘, distance(x1,y1,x2,y2)) return(0) main()… Continue Reading →

QUIZ7

P1.- #Jorge Fernando Saldaña Cabal #A01350730 import math def distance(x1,y1,x2,y2): z1=x1-x2 z1=z1**2 z2=y1-y2 z2=z2**2 res=math.sqrt(z1+z2) return(res) def main(): x1=int(input(‘Type x1: ‘)) y1=int(input(‘Type y1: ‘)) x2=int(input(‘Type x2: ‘)) y2=int(input(‘Type y2: ‘)) print(‘The distance between those points is: ‘, distance(x1,y1,x2,y2)) return(0) main()… Continue Reading →

Quiz #7

In this Quiz we had to do two tasks. In the first one we had to create a program which calculates the Fibbonaci number of a value that we give to the computer. So the codes for the first task… Continue Reading →

Quiz #7

In this Quiz we had to do two tasks. In the first one we had to create a program which calculates the Fibbonaci number of a value that we give to the computer. So the codes for the first task… Continue Reading →

Quiz #7

Here is my code for quiz #7 in github. It took me a while but it works.

Fibonacci: https://github.com/VanessaBaeza17/Quiz7/blob/master/Fibonacci

Palindrome: https://github.com/VanessaBaeza17/Quiz7/blob/master/Palindrome

Thanks!

 

 

Quiz 7

The exercise was so easy, but i have a problem with the exercise number 1. I write a double (( and the terminal says that have a syntax error and I don’t see the double (( and then we I saw it, I delate one and then the program works well. Here is the code…

Quiz 7

The exercise was so easy, but i have a problem with the exercise number 1. I write a double (( and the terminal says that have a syntax error and I don’t see the double (( and then we I saw it, I delate one and then the program works well. Here is the code…

Palindromes and Fibonacci #Quiz7

This quiz was a little bit more of a challenge since it involved using iterations and strings to output a number in a sucession and determine if an input was a palindrome or wasn’t. It was difficult to find the pattern in the fibonacci series but i discovered that the values were passed to be sum again and again. First, there were standard results such as the first 2 numbers of the series so I did them with ifs to return the value required. For other values, I worked with 3 variables which changed values between them, and after the number was met the Sum would return from the function, thus giving the  expected value. 

Here’s the code: 

https://github.com/CarlosGallegosT/Codes007/blob/master/Fibonacci

The question regarding palindromes was a little bit more complicated than the previous one. During the test, I managed to create a function to reverse the string by using the input lenght. What I couldn’t do was to correctly compare the values found in the strings. I guessed I did something wrong with the return or with any of the functions since it only returned one statement. Finally, I tried again and it worked as expected. Here’s the code:

https://github.com/CarlosGallegosT/Codes007/blob/master/Palindrome

Thanks for watching!

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).