Thursday, August 6, 2015

Exercises - Week 1 to 4 - "Mirror Mirror"

Welcome Pyhtonistas!
In order to collaborate with the participants of our course, I have developed these 3 simple exercises -away from the usual mathematical style- to practice the course content with the tools seen from week 1 to 4. I hope you enjoy it!

Mirror Mirror
1.       Make a program in Pyhton that given a phrase, convert it in to their mirror image.
Input: “Hello World”
Output: “dlroW olleH”
2.       Make a program that given a phrase and a integer number, convert it in to their shifted image. The number must be in the range [1-length(phrase)]
Input: “Hello World”, 3    / “This is a simple sample”, 7
Output: “lo WorldHel”     / “ a simple sampleThis is”
3.       Make a program that given a phrase and a integer number, convert it in to their mirror shifted image (Nightmare level). The number must be in the range [1-length(phrase)]
Input: “Hello World”, 4    / “This is a simple sample”, 7

Output: “lleHdlroW o”     /  “si sihTelpmas elpmis a” 

Thursday, June 25, 2015

Programming for Everybody (Python)

This blog was born today with the idea of gathering some students with same interests while taking the Coursera -course-:

by Charles Severance

The idea is make it fun, simple and very interesting while sharing doubts, ideas and solving problems with each others.