GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python/assignments.txt at master · sambapython/python

Expand file tree

/

assignments.txt

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
206 lines (180 loc) · 13.3 KB
/

assignments.txt

Copy path

File metadata and controls

206 lines (180 loc) · 13.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
1. write a program to findout
2. write a program to chek given substring is there in actual string or not? (search should be case insensitive)
3. take a number from the user and check whether even or odd
4. take a number from the user and check whether it is prime?
5. take a string from the user and check contains only digits or not?
6. take a string from the user and check contains only alphabets or not?
7. take a string from the user and check contains only special chars or not?
8. take a string from the user and check contains only capiatl letters or not?
9. take a string from the user and check contains only small letters or not?
10. Show the below menu to the user until and until user select quit and display corresponding os message
'''
Menu:
1. windows
2. Linux
3. Mac
4. quit
'''
11. take a string from the user and check contains atleast one digit or not?
12. take a string from the user and check contains atleast one alphabets or not?
13. take a string from the user and check contains atleast one chars or not?
14. take a string from the user and check contains atleast one capital letter or not?
15. take a string from the user and check contains atleast one small letter or not?
16. Take the input from the user for(Total number of people, toatl number of busses, Number of seats for bus). Based on the input
Deside whether there is sufficient busses or not and give solution for how many extra busses required.
17. Print the first 100 odd numbers
18. Determine the factors of a number entered by the user
19. Play a number guessing game (User enters a guess, you print YES or Higher or Lower)
20. Take two numbers from the user a,b check whether a is divisible by b or not?
21. Given an age, figure out whether someone's a baby, toddler, child, teenager, adult or old codger.
22. Find the sum of all the multiples of 3 or 5 below 1000
23. Write a program to findout big of two numbers
24. Write a program to findout biggest number in the given numbers.
25. findout third occurance of given substring
26. findout nth occurance of given substring
27. Taake some single digit numbers from the user and findout min, maximum, sum, average
28. WAP> 10 -> 000010
100 -> 000100
1000 -> 001000
2345678 -> 2345678
29. names ="emp1,emp2,emp3,emp4" iterate through the employee names.
30. Take actuual string, soucrce string, destination string. replce first nth occurances of soucestring with destination string of actual string
31. Taake numbers from the user and findout min, maximum, sum, average
32. l=[10,20,30,[40,50,60],70,[80,90,20]]. Convert this list as sigle dimentiona list
33. input: "google" print count of each character
34. Convert n dimentional list to single dimentiona list.
35. l=[1,2,3] just make it as a string.
36. l=[1,2,3,[4,5,6],7,[8,9,10]] for single dimentional list
37. l=['a','A','b','B','d','D','c','C'] WAP to find out case insensitive count and case insensitive search for an element.
38. l=['a','A','b','B','d','D','c','C'] sort the list properly
39. find the start position of the largest block of repeated characters in a given string
40. WAP to find union and intersection of lists.
41. input: fun(5) output: [1,2,3,4,3,2,1]
42.input fun('abc') output: [[],][a],[b],[c],[a,b],[b,c],[c,a],[a,b,c]]
43. Remove duplicates from the list: a=[1,2,3,2,3,4,1,,3,4]
44. l=['1','2','3'] get the sum of the list
45. l1=[1,2,3,4] l2=[5,6,7,8] sum of two lists
46. Find third max value of element in a list with soring and without sorting a list.
47. Input = ["1/1","1/2","1/3","1/4","2/5","2/6","2/8"] Output = [['1/1-4'], ['2/5-6'], ['2/8']]
48. l=[1,2,3,5,7,8,9,10,11,12,13,20,22,23,24,25,26,27,20,21,22,4] output = [[1, 2, 3], [5], [7, 8, 9, 10, 11, 12, 13], [20], [22, 23, 24, 25, 26, 27], [20, 21, 22], [4]]
49. input = 1,2,3,4,5,6,8,10 output = odd,even,odd,even,odd,even,even,even
50. input n=3
output: 111
101
111
51. input: google
output: {'g':2,'o':2,'l':1,'e':1} use dictionary comprehension
52. keys=['k1','k2'], values = ['v1','v2'] form a dictionary.
53. Sort the list marks = [("mohan", 80), ("satish", 90), ("purnesh", 40), ("venkat", 30)] acording to descending order of marks
54. write a function to get dynamic list for floating numbers also based on strat and end and step parameters
55. find out all perfect numbers in given range
56. WAP to do all stack operations using lists
57. WAP to do all queue operations using lists
58. WAP to remove n occurances of specified element from a list
59. copy 1 file content in to another file(Take the source and destination file path from the user)
60. Show the below menu to the user:
1. Add a row
2. modify a row
3. delete a row
Go with one unique field in the file. And maintain that unique constraint in all file modifiction operations
Use .CSV file for this program
61. number of lines, words, characters
62. convert .txt file in .json
63. Take three columns disease, symptoms, advice in a file and fill the details
Ask the user to enter symptoms. Based on this symptoms Suggest the user to what disease it may be and few advices.
64. Take employees info (id,name, age, adress, sal, height, weight)
a. Take id, provide employee information for that id.
b. find out average salary.
c. find out which age, address taking the heighest salary
d. find out every employee BMI value
e. Finally find out the Organization overall BMI
65.read the file which contains the size greater than your ram size
66. Read ten gb movie
67. Collect emp information in a file Provide these operations.
Menu:
1. Get information information of an employee
2. Modify employee information
3. delete an employee information (Only status field change in the employee file)
4. Add an employee.
68. Take Source and destination file paths from command line arguments and copy the sourcontent into destination.
Make Sure that your program checking the below conditions.
1.if the source file not there. Should ask the user to enter new source file or want to quit a program
2.if the destination file already there in the specified path. Should warn the user want to proceed or want to enter new destination file name or want to quit
69. Bulk file copy.
Take source and destination file paths from a file and copy the source file content into destination file.
Maintain configuration file and put the below fields there
Source not found: Skip the copy
destination found: skip/replace
maintain a remarks log. What are the files skiped from copy because no source file found. What are the files skip/replaced because of destination file foun in the specified path
OOPS
70. Write a class(DB) program to create a table, insert values, update values, delete values of the table.
All database operations code write in a file(db_operations.py) and call these operations in another file( app.py).
In app.py create instance of the DB class and call all the methods by passing some data.
Note: if you don’t have knowledge on db operations then write for file operations.
71. write a program to do registration.
Write a methods in a class DB to open database connection and insert details in to database table.
Write a Model parent class and implement a create method. Call a database insert method into the create method. Write child class person for Model and override method create method and call the parent(Model) class create method in the child(person)
create an instance of person class and call the create method.
72. create a user defined datatype, and provide functionalities of addition substraction and multiplication. Create three instances(obj1,obj2,obj3) and print an output of obj1+obj2+obj3, obj1-obj2-obj3, obj1*obj2*obj3
73. addition, substraction, multiplication operations are not supported by dictionary. Write a program to provide addition, substraction, and multiplication operations to dictionary. Write your own definition for operations.
74. write a class that can create only one object. IF create one more object then it should written existing object but not new. Create three instances and print id’s of the instances. All the id’s should show same address.
75. implement class method and instance method and static method in a class with an example. Create a instance and call all the methods. Write down what is class method and instance method and static method.
76. write a class program to demonstrate method overloading in python using below scenario.
Write a class and constructor to create an instances like below
a. p1 = person(id=1,name=”ashok”,age=23,sal=56787)
b. p2 = person(id=2,age=24,adhar=23456)
c. p3 = person(id=4,pan=”brcp3456”,sal=23,age=45)
make instance iterable and provide the operation sp1+p2, p1-p2. Give your own definition for the operations
77. Remove duplicates elements of the list withoud using built in keywords and temporary list.
78. WAP to replace perticular number of substings with a given destination string
79. WAP top remove substring form the given string without using replace function
80 WAP to remove perticular element from a given list for all occurancers
81. take two lists keys, values and form a dictionary
82. delete more than one key value pair at a time.
83. s="python program" output: python marporp.
84. Use any api service using requests module and parse the data
85. Write a serivces to provide the data there in the database to the clients
86. Write a services to create, delete and modify the data which is there in the database.
87. Write a own_split(data=data,delimeter='\n',keepdelimeter=False) method to keep the delimeter while splitting the data, if the developer pass keepdelimeter=True
88. persons=[{'id':1,'name':"name1"},{'id':2,'name':'namme2'}]. write the pesons info in to file and read and iterate through the data
89. Get the information from the system for every minute and show the freespace and used space in the RAM. and performance of the CPU.
90. "[{'id': 1, 'name': 'name1'}, {'id': 2, 'name': 'name2'}]" the data is in the form of string. Conver this in to list of dictionaries
91. Find the ram and cpu performance for every hour and draw a consolidated bar graph for every day.
92. Take the data set of sutdents with total marks and add the rank,result, grade columns.
93. Create customer table in any DBMS (sqlite3/mysql/postgres/oracle). write service and request program: request: sends the client id, service: based on client id the service need to send the client information.
94. Given number is perfect number
95. print first 100 prime numbers
96. What is the biggest prime number in the given range
97. check whether given number is armstrong number or not
98. Find bigest armstrong number in a given range
99. print first ten armstrong numbers
100. WAP to reverse each word in the given sentence.
101. WAP to find the duplicated words in the given sentence.
102. How to check if two Strings are anagrams of each other?
anagram: Two strings are anagrams if they are written using the same exact letters, ignoring space, punctuation and capitalization. Each letter should have the same count in both strings. For example, Army and Mary are anagram of each other.
103. How to program to print first non repeated character from String?
for Example if given String is "Morning" then it should print "M". This question demonstrates efficient use of Hashtable. We scan the string from left to right counting the number occurrences of each character in a Hashtable. Then we perform a second pass and check the counts of every character. Whenever we hit a count of 1 we return that character, that’s the first unique letter. Be prepared for follow-up question for improving memory efficiency, solving it without hash table as well.
104. How to find all permutations of String?
for example, the if input is "xyz" then it should print "xyz", "yzx", "zxy", "xzy", "yxz", "zyx".
105. How to check if String is Palindrome?
For example, if the input is "radar", the output should be true, if input is "madam" output will be true, and if input is "python" output should be false.
106. How to remove duplicate characters from String?
For example, if the input is ‘bananas’ the output will be ‘bans’. Pay attention to what output could be, because if you look closely original order of characters are retained the in output.
107. How to return highest occurred character in a String?
For example if input is "aaaaaaaaaaaaaaaaabbbbcddddeeeeee" it should return "a".
108. How to sort String?
109. Reverse this string 1+2*3-20. Note: 20 must be retained as is.
Expected output: 20-3*2+1
110. Perform letft and right shift on strings.
111. Reverse the words in string eg. 'The Sky is Blue'.
then print 'Blue is Sky The'.
112. WAP client/server program
client: ask the cusotmer id to enter by user, send customer id
service: recieve custid, look for data in database, get the data from data base. send it to client
client: print that data in his console
conditional statements assignments
113. take the number of passengers. number of seats for a bus, howmany busses required to travel
114. take temp in foreightheat -> celcius
115. take number from the user decide whether it is evn or od-> positive number or negative number
116. take a string from the user print the length. if the user not given anything show an error message
117. code to perform mathematical operations. take two numbers from the user: 1. ad, 2. sub, 3. mul, 4.div, 5.quit
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.