\begin{center} \textit{ Allocated Time: \textbf{30} minutes\\ Solve \textbf{2} out of \textbf{3} questions } \end{center}

Warm Up

Read an integer $N$ (use raw_input() command). Without using any string methods, try to print the following:

$$ 12...N $$

Note that "$...$" represents the values in between.

Input Format

The first line contains an integer $N$.

Output Format

Output the answer as explained in the task.

Sample Input

3

Sample Output

123

Even Fibonacci Generator

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with $1$ and $1$, the first $12$ terms will be:

$$ 1, 1, \mathbf{2}, 3, 5, \mathbf{8}, 13, 21, \mathbf{34}, 55, 89, \mathbf{144},... $$

yield the value

write a generator which yields a sequence of even numbers.

def fibeven():
    # complete this part 
    
gen = fibeven()
for i in gen:
    if i > 150:
        break
    else:
        print i

expected result would be:

2
8
34
144

Ain't Cool Enough?

By considering the terms in the Fibonacci sequence whose values do not exceed $N$, find the sum of the even-valued terms.

Input Format

First line contains $T$ that denotes the number of test cases. This is followed by $T$ lines, each containing an integer, $N$.

Output Format

Print the required answer for each test case.

Sample Input

2
10
100

Sample Output

10
44

Explanation

  • For $N=10$, we have $\{2, 8\}$, sum is $10$.
  • For $N=100$, we have $\{2, 8, 34\}$, sum is $44$.

Validating Phone Numbers

A valid mobile number is a ten digit number starting with a $7$, $8$ or $9$. In another hand, people use to write phone numbers in different styles:

88889900
888-899-00
888 899000
8888 9900
8888-9900

Now What?

use python's regular expression (re) library to findall() valid phone numbers in a given text.

Input Format

a text file, all characters are supposed to be in ASCII format.

Output Format

Output the answer as explained in the task.

Sample Input

Contact info:
Phone number: 8912 2134
Fax: 8912 2100
Email: whatever@blaah.com

Sample Output

8912 2134
8912 2100