Python Assignment
Python Assignment
1) Write a Python program to find those numbers which are divisible by 8 and
multiple of 5, between 100 and 600 (both included).
2) Write a Python program to count the number of even and odd numbers
from a series of numbers.
3) Write a Python program which accepts a sequence of comma separated 4
digit binary numbers as its input and print the numbers that are divisible by
4 in a comma separated sequence
Sample Data : 0110,0011,1010,1001,1100
Expected Output : 1100
Sample Input
5
23665
Sample Output
5
3) Given the names and grades for each student in a Physics class of students, store them in
a nested list and print the name(s) of any student(s) having the second lowest grade.
Note: If there are multiple students with the same grade, order their names alphabetically and
print each name on a new line.
Sample Input 0
5
Harry
37.21
Berry
37.21
Tina
37.2
Akriti
41
Harsh
39
Sample Output 0
Berry
Harry
1) You have a record of N students. Each record contains the student's name, and their
percent marks in Maths, Physics and Chemistry. The marks can be floating values. The
user enters some integer N followed by the names and marks for N students. You are
required to save the record in a dictionary data type. The user then enters a student's
name. Output the average percentage marks obtained by that student, correct to two
decimal places.
Sample input:
3
Krishna 67 68 69
Arjun 70 98 63
Malika 52 56 60
Malika
Sample output:
56.00
Write a program to read emp name and salary in to a dictionary and print first two minimum
salaries of an organization.
Sample input:
Ravi 25000
Hari 28000
Raghu 22000
Priya 30000
Shruthi 21000
Sample Output:
Shruthi 21000
Raghu 22000
Sample Input
mark zuckerberg
Sample Output
Mark Zuckerberg
3) In this challenge, the user enters a string and a substring. You have to print the number of
times that the substring occurs in the given string. String traversal will take place from
Sample Input
ABCDCDC
CDC
Sample Output