Assignment

  • Write a program which to print the numbers in reverse order and the numbers which are divisible by 3 but are not a multiple of 5, between 200 and 300. The numbers obtained should be printed in a hyphen (-) separated sequence on a single line.

  • Write a program which can compute the factorial of a given numbers without using function.

  • Write a program which can convert one form of temperature unit to other or vice versa (It must include degree Celsius, Fahrenheit and Kelvin).

Eg. User gives input 3oC then answer should be 37.4oF and 276.15K

  • Write a program to for following series. Assume the input numbers are 14 19 20 48 233 43 54 then output series is 14 5 1 28 185 … etc. Input series at least contain 10 numbers. The numbers obtained should be printed in sequence on a single line.
  • Write a program to compute mathematical arithmetic (+,-,*,/) statement. Statement input in the string format like “4+5-3” then result is 6. String must contain minimum two operators.

  • Write a program to print the given number pattern.

Example
Input
Input N: 5
Output
54321
5432
543
54
5
54321
5432
543
54
5
  • Write a program to find all duplicate numbers with count and unique numbers in the list.

  • Write a recursive function in programming to find reverse of a number.

  • Write a program to print hollow square or rectangle star(*) pattern series using for loop.

Example
Input
Enter number of rows: 5
Output
* * * * *
*       *
*       *
*       *
* * * * *
  • Write a program to print the given number pattern.

Example
Input
Enter number of rows: 4
Output
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1

 

  • Write a Python program to calculate number of days between two dates.
    Sample dates : (2014, 7, 2), (2014, 7, 11)
    Output : 9 days
  • Write a Python program to convert an integer to binary keep leading zeros.
Sample Input: 17
Output: 00010001

 

  • Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters.
Sample String : 'The quick Brow Fox'
Expected Output : 
No. of Upper case characters : 3
No. of Lower case Characters : 12

 

  • Write a Python program that accepts a hyphen-separated sequence of words as input and prints the words in a hyphen-separated sequence after sorting them alphabetically.
Sample Items : green-red-yellow-black-white
Expected Result : black-green-red-white-yellow

 

  • Write a Python program to print a specified list after removing the 0th, 4th and 5th elements.
Sample List : ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
Expected Output : ['Green', 'White', 'Black']

 

  • Write a Python program to reverse words in a string.

 

  • Write a Python Program to Count the Number of Lines in a Text File.

 

  • Write a Python program to remove spaces from a given string.

 

  • Write a program in Python to display the pattern like right angle triangle with a number.

 

  • Write a program to let the user know email address entered is valid or not?
Valid- user@gmail.com, abcd@xyz.com
Invalid - user@cbv,  abcd @fjd.com

 

  • Python Program to Convert Decimal to Binary, Octal and Hexadecimal.

 

  • Write a python program to print ASCII Table.

 

  • Write a Python Program to Check Whether a Number is Palindrome or Not.

 

  • Write a Program to find G.C.D.

 

  • Write a Python  Program to Write a Sentence to a File.

 

  • Write a Python program to convert days into years, weeks and days.

 

  • Write a Python program to enter length in centimeter and convert it into meter and kilometer.

 

  • Python Program to Convert Celsius To Fahrenheit

 

  • Python Program to Find Sum of Natural Numbers

 

  • Python Program to Multiply Two Matrices