cianconway / Interview_Questions

Various python files for typical interview questions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interview Questions

Fibonacci.py

Python module to calculate the fibonacci sequence for a range of numbers

Fizzbuzz.py

Fizzbuzz solution, for numbers between 1 and 100 print Fizz if the number is divisible by three and print buzz if the number is divisible by five. Also print FizzBuzz if the number is divisible by both three and five.

reverse_string.py

Reverse the characters in a given string. This is done using the extended slice the syntax for which is [begin:middle:end] and by leaving the first two blank and inputting -1 for the end it reverses the string.

object_oriented.py

Basic example of a class for a Person. Then a sub class which inherets from the parent class and expands on the attributes. Instances of both child and parent class are included too.

square_list.py

Given a list output a new list with the square of all the values from the first list.

square_sum.py

Every integer can be described as sum of square numbers, like 12=4+4+4. Write a function that returns the min # of square numbers needed. e.g. f(12)=3, f(9)=1, f(3)=3

try_catch.py

Try and catch errors

is_palindrome.py

Checked whether an inputted string is a plaindrome and returns True or False if so.

About

Various python files for typical interview questions


Languages

Language:Python 100.0%