Advertisements
Advertisements
TypeError occurs while statement 2 is running. Give reason. How can it be corrected?
>>> tuple1 = (5) #statement 1
>>> len(tuple1) #statement 2Concept: undefined >> undefined
Write a program to read the email IDs of n number of students and store them in a tuple. Create two new tuples, one to store only the usernames from the email IDs and the second to store domain names from the email IDs. Print all three tuples at the end of the program. [Hint: You may use the function split()]
Concept: undefined >> undefined
Advertisements
Write a program to input the names of n students and store them in a tuple. Also, input a name from the user and find if this student is present in the tuple or not. We can accomplish these by:
writing a user-defined function
Concept: undefined >> undefined
A bank is a financial institution that is involved in borrowing and lending money. With advancements in technology, online banking, also known as internet banking allows customers of a bank to conduct a range of financial transactions through the bank’s website anytime, anywhere. As part of the initial investigation, you are suggested to
- collect a bank application form. After careful analysis of the form, identify the information required for opening a savings account. Also, enquire about the rate of interest offered for a saving account.
- The basic two operations performed on an account are Deposit and Withdrawal. Write a menu-driven program that accepts either of the two choices of Deposit and Withdrawal, then accepts an amount, performs the transaction, and accordingly displays the balance. Remember, every bank has a requirement for a minimum balance which needs to be taken care of during withdrawal operations. Enquire about the minimum balance required in your bank.
- Collect the interest rates for opening a fixed deposit in various slabs in a savings bank account. Remember, rates may be different for senior citizens.
Finally, write a menu-driven program having the following options (use functions and appropriate data types):
- Open a savings bank account
- Deposit money
- Withdraw money
- Take details, such as the amount and period for a Fixed Deposit, and display its maturity amount for a particular customer.
Concept: undefined >> undefined
Participating in a quiz can be fun as it provides a competitive element. Some educational institutes use it as a tool to measure the knowledge level, abilities, and/or skills of their pupils either on a general level or in a specific field of study. Identify and analyze popular quiz shows and write a Python program to create a quiz that should also contain the following functionalities besides the one identified by you as a result of your analysis.
- Create an administrative user ID and password to categorically add, modify, or delete a question.
- Register the student before allowing her or him to play a quiz.
- Allow selection of category based on the subject area.
- Display questions as per the chosen category.
- Keep the score as the participant plays.
- Display the final score.
Concept: undefined >> undefined
Our heritage monuments are our assets. They are a reflection of our rich and glorious past and an inspiration for our future. UNESCO has identified some Indian heritage sites as World heritage sites. Collect the following information about these sites:
- What is the name of the site?
- Where is it located?
District
State - When was it built?
- Who built it?
- Why was it built?
- The website link (if any).
Write a Python program to
- create an administrative user ID and password to add, modify or delete an entered heritage site in the list of sites.
- display the list of world heritage sites in India.
- search and display information about a world heritage site entered by the user.
- display the name(s) of world heritage site(s) on the basis of the state input by the user.
Concept: undefined >> undefined
Explain the following along with their applications.
Artificial Intelligence
Concept: undefined >> undefined
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 * 2Concept: undefined >> undefined
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 *= 2Concept: undefined >> undefined
Consider a list:
list1 = [6, 7, 8, 9]
What is the difference between the following operation on the list1:
list1 = list1 * 2Concept: undefined >> undefined
Consider the following tuples, tuple1 and tuple2:
tuple1 = (23,1,45,67,45,9,55,45)
tuple2 = (100,200)
Find the output of the following statement:
print(tuple1 + tuple2)Concept: undefined >> undefined
Consider the following dictionary stateCapital:
stateCapital = {"AndhraPradesh":"Hyderabad",
"Bihar":"Patna","Maharashtra":"Mumbai",
"Rajasthan":"Jaipur"}
Find the output of the following statement:
print("Maharashtra" in stateCapital)Concept: undefined >> undefined
You are planning to go on a vacation. You surfed the Internet to get answers to the following queries:
- Weather conditions
- Availability of air tickets and fares
- Places to visit
- Best hotel deals
Concept: undefined >> undefined
Write the difference between the following:
Active and passive footprints.
Concept: undefined >> undefined
Give full form of ISCII.
Concept: undefined >> undefined
Explain the following along with their applications.
Machine Learning
Concept: undefined >> undefined
Two friends decide who gets the last slice of a cake by flipping a coin five times. The first person to win three flips wins the cake. An input of 1 means player 1 wins a flip, and a 2 means player 2 wins a flip. Design an algorithm to determine who takes the cake.
Concept: undefined >> undefined
Suppose you are collecting money for something. You need ₹ 200 in all. You ask your parents, uncles, and aunts as well as grandparents. Different people may give either ₹ 10, ₹ 20, or even ₹ 50. You will collect till the total becomes 200. Write the algorithm.
Concept: undefined >> undefined
Write an algorithm to find the greatest among two different numbers entered by the user.
Concept: undefined >> undefined
Consider the following string mySubject:
mySubject = "Computer Science"
What will be the output of the following string operation:
print(mySubject[:3] + mySubject[3:])
Concept: undefined >> undefined
