Create an algorithm, using python
Move each bar from tower A to tower C. You can only move one bar at a time. You are not allowed to place the larger disk onto a smaller disk.
def novel_or_knockoff(name, off_brand):
# novel_or_knockoff()
# @type:
# @rtype:
count = 0
for index in range(0,len(name)):
if name[index] != off_brand[index]:
count = count + 1
if count >= 3:
return "Novelty"
else:
return "Knockoff"
# Example: if Playstation [index] != playstation [index] :
count = count + 1
if count >= 3:
return "Novelty"
else;
return "Knokoff"
Write a program that computes and displays the charges for a patient’s hos- pital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered:
• The number of days spent in the hospital
• The daily rate
• Hospital medication charges
• Charges for hospital services (lab tests, etc.)
The program should ask for the following data if the patient was an outpatient: • Hospital medication charges
• Charges for hospital services (lab tests, etc.)
The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, and the other function accepts arguments for outpatient information. Both functions should return total charges. All functions should be tested individually.
Input validation: Do not accept negative values for any data, and make your program robust against accidental non-numeric data.
Write a program that reads words and arranges them in a paragraph so that all other than the last one are exactly forty characters long. Add spaces between words to make the last word extend to the margin. Distribute the spaces evenly. Use a helper function for that purpose. A typical example would be
Four score and seven years ago our
fathers brought forth on this continent
a new nation, conceived in liberty, and
dedicated to the proposition that all
men are created equal.
Define metadata
Create a Spending application to help examine the spending patterns of a user. The application should prompt the user for the amount spent last month on food, clothing, entertainment, and rent, and then displays a table showing the percentage of expenditures in each category.
Area of rectangle
What is the main difference between the PC and Apple is?”
Do the following Tasks:
1. Set all the router’s name based on your student id as shown in figure [0.5 Mark]
2. Set an enable password as cisco for all routers [0.5 Mark]
3. Set a secret password as itgn235 for all routers [1 Mark]
4. Configure IP address to all the routers interfaces and PCs based your student id as shown in figure and make sure that all interfaces links are up [2 Marks]
5. Configure dynamic RIP routing protocol in all routers [1.5 Marks]
6. Configure dynamic OSPF routing protocol in all routers [1.5 Marks]
7. Configure a Telnet using ud123 as password in all router and verify [1.5 Marks]
8. Configure a Standard Access List to deny Ping to router S1234D from all other routers [1 Mark]
9. Configure an Extended Access List to deny Telnet to router S1234C from router S1234A and S1234B [1.5 Marks]
10.Use the given list command to capture/screen short to displays detailed information about each routers.
Write a program to open a file gr.txt.Add these contain "My name is XYZ"and afterwards and "How are you".Shift file pointer in such a way that final content in the file is "My name is How are you".