N = '5' try: print('WORD' + N, end='#') except: print('ERROR', end='#') finally: print('OVER')
def Change(N): N = N + 10 print(N, end='$$') N = 15 Change(N) print(N)
D = {'S01': 95, 'S02': 96} for I in D: print(I, end='#')
‘Swabhaav’ is a big NGO working in the field of Psychological Treatment and Counselling, having its Head Office in Nagpur. It is planning to set up a center in Vijayawada. The Vijayawada Center will have four blocks – ADMIN, PSYCHIATRY, PSYCHOLOGY, and ICU. You, as a Network Expert, need to suggest the best network-related solutions for them to resolve the issues/problems mentioned in questions (i) to (v), keeping the following parameters in mind:
Suman has created a table named WORKER with a set of records to maintain the data of the construction sites, which consists of WID, WNAME, WAGE, HOURS, TYPE, and SITEID. After creating the table, she entered data in it, which is as follows :
Consider a binary file, items.dat, containing records stored in the given format: Write a function, Copy\_new(), that copies all records whose amount is greater than 1000 from items.dat to new\_items.dat.
items.dat
Copy\_new()
amount
new\_items.dat
Differentiate between 'w' and 'a' file modes in Python.
Sangeeta is a Python programmer working in a computer hardware company. She has to maintain the records of the peripheral devices. She created a csv file named Peripheral.csv to store the details. Structure of Peripheral.csv:
Peripheral.csv
\begin{tabular}{|c|c|c|} \hline \textbf{P\_id} & \textbf{P\_name} & \textbf{Price} \\ \hline \end{tabular}
P\_id
P\_name
Price
Sangeeta wants to write the following user-defined functions:
Add\_Device()
Count\_Device()
\[ \begin{array}{|c|c|c|c|} \hline \textbf{S\_id} & \textbf{S\_name} & \textbf{Address} & \textbf{S\_type} \\ \hline S001 & Sandhya & Rohini & Day Boarder \\ S002 & Vedanshi & Rohtak & Day Scholar \\ S003 & Vibhu & Raj Nagar & NULL \\ S004 & Atharva & Rampur & Day Boarder \\ \hline \end{array} \]
\[ \begin{array}{|c|c|c|} \hline \textbf{S\_id} & \textbf{Bus\_no} & \textbf{Stop\_name} \\ \hline S002 & TSS10 & Sarai Kale Khan \\ S004 & TSS12 & Sainik Vihar \\ S005 & TSS10 & Kamla Nagar \\ \hline \end{array} \]
Write a function, c_words(), in Python that separately counts and displays the number of uppercase and lowercase alphabets in a text file, Words.txt
Our parents told us that we must eat vegetables to be healthy. And it turns out, our parents were right! So, what else did our parents tell?
def callon(b=20, a=10): b = b + a a = b - a print(b, "#", a) return b x = 100 y = 200 x = callon(x, y) print(x, "@", y) y = callon(y) print(x, "@", y)
Write the SQL commands to perform the following tasks: (i) View the list of tables in the database Exam(ii) View the structure of the table Term1