0% found this document useful (0 votes)
4 views

tcl and python que

Uploaded by

Ashwin jha
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

tcl and python que

Uploaded by

Ashwin jha
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Python

=======

1.Write a Python program to calculate number of days between two dates

2.Write a Python program to print first 100 fibonacci numbers

3.Write a python program to print number triagle with specified number of rows
given as input

For example, If input is 4

23

456

78910

4.Write python program to check if a given number is armstrong number or not

5.Write a python program to get the in the interface status and ip address if
Interface is given as input(For ex. Input : Ethernet 0, Output : Status: up Ip-
Address: 10.108.00.5) Use regular expressions appropriately

Router# show ip interface brief

Interface IP-Address OK? Method Status Protocol

Ethernet0 10.108.00.5 YES NVRAM up up

Ethernet1 unassigned YES unset administratively down down

Loopback0 10.108.200.5 YES NVRAM up up

Serial0 10.108.100.5 YES NVRAM up up

Serial1 10.108.40.5 YES NVRAM up up

Serial2 10.108.100.5 YES manual up up

Serial3 unassigned YES unset administratively down down

6.Write a program to remove blankspaces in a paragraph(get paragraph with spaces


and print full paragraph without any spaces in between)
7.Write a Python program to concatenate all elements in a list into a string and
return it.

8.Write a Python program to remove duplicates from Dictionary

9.Write a Python program to find those numbers which are divisible by 7 and
multiple of 5, between 1500 and 2700

10.Write a Python program to check the validity of password input by users. Go to


the editor

Validation :

At least 1 letter between [a-z] and 1 letter between [A-Z]

At least 1 number between [0-9].

At least 1 character from [$#@].

Minimum length 6 characters.

Maximum length 16 characters

===================================================================================
=========================================================================

TCL

====

1. Write a tcl program to grep the Ip address from a pool of IP addresses, check if
it's valid and print which class the IP address belongs to(Class A, Class B, etc)

2. Write a tcl program to grep the mac-address check if it's valid and increment
the mac address upto the number of times based on the input(for ex. 50 mac
addresses with increment of 2, 50 and 2 are the inputs)

3. Write a tcl program to remove blank spaces in a paragraph using regsub


4. Write a tcl program to reverse a string(without using string reverse command)
and check if it's palindrome

5. Write a tcl program to simulate lrange command

6. Write a program to find the length of string without using string command

7. Login a router and execute command using expect(to be done in office)

8. Selenium(to be done in office)

1. access url(Web GUI page of router)

2. click tab

3. store the content in variable

4. and copy it to a log

9. Write a recursive procedure that computes factorial of a given number

10.Write a tcl program to reverse your mobile number

You might also like