WSQ 13 Exam 2

Hey class, this is the post about the exam of the second partial. We did 4 programs. So lets start with it.

Exam fever and food

The first code

The user is going to give the size of the triangle they want and the program has to print a triangle with “T”. we just need to make a recursion so one of the loops will print horizontally and the other vertically.

Second code 

The code raise one number the user write to the power of another number the user gives to you you can use a loop or include cmath so you can use the function pow.

Third Code

This is an old one. Fibonacci the explanation of the recursion is on the quiz 3 but the code is also here.

The last one

As the third,  this one i have already made the programe will tell you if the srting is a palindorme or not.

 

 

CC BY-SA 4.0 WSQ 13 Exam 2 by alibarramg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.