In the examination, Rajiv is asked to write a python function to demonstrate the use of the "+" operator. During the examination, Rajiv got confused that either he needs to add two numbers using "+" or concatenate two strings. So, Rajiv decided to implement both cases in his python code. Your task is to help Rajiv by writing a python function Add_Values(a,b)
CCBP Login
Reference image:
https://assets.ccbp.in/frontend/content/dynamic-webapps/ccbp-login-op.gif
<!DOCTYPE html>
<html>
<head> </head>
<body>
<div class="container">
<h1 class="form-heading">CCBP Login</h1>
<form id="myForm">
<div class="username">
<label for="name" class="username-heading">User Name</label>
<input autocomplete="off" type="text" id="name" class="input" />
<p id="nameErrMsg" class="error-message"></p>
</div>
<div class="password">
<label for="password" class="password-heading">Password</label>
<input type="password" id="password" class="input" />
Bike Search
Use the below reference image
https://assets.ccbp.in/frontend/content/dynamic-webapps/bike-search-op.gif
HTML
<!DOCTYPE html>
<html>
<head></head>
<body>
Your code goes here
</body>
</html>
Instructions
Achieve the design with HTML, CSS, and functionality with JS
let a and b be two linked lists. write a c function to create a new linked list that contain elements alternately from A and B, beginning with the first element of A. If you run out of the elements in one of the lists, then append the remaining elements of the other list to C.
Instruction:
Create a Java Program that will accept two values.
Determine if the two argument lists are identical or not.
Sample IO #1:
Sample Input:
Name1: Jose
Birthday: 1-1-2000
Name2: Jose
Birthday: 1-1-2000
Output:
IDENTICAL
Name: Jose
BirthDate: 1-1-2000
Name: Jose
BirthDate: 1-1-2000
Sample IO #2:
Sample Input:
Name1: Jose
Birthday: 1-1-2000
Name2: Jose
Birthday: 6-7-2012
Output:
NOT IDENTICAL
Name: Jose
BirthDate: 7-6-2000
Name: Jose
BirthDate: 6-7-2012
MyDate Class
Attribute/s: private int day, month, year;
Constructor/s:
public MyDate(int month, int day, int year)
Method/s:
Setters and getters, public boolean equals(Object o);
public int hashCode(); and
public String toString()
Person Class
Attribute/s: private String name; private MyDate dob;
Constructor/s:
public Person(String name, MyDate dob)
Method/s: Setters and getters,
public boolean equals(Object o);
public int hashCode(); and
public String toString()
Your Test class named TestPerson
Friend and Enemy
A group of F friends went to a haunted house.Each member was given a shirt with a number on it ranging from 1 to F. As they entered the haunted house, one of them was kidnapped and an enemy joined them.But unfortunately, the enemy didn't wear the shirt with the same number as the kidnapped one, instead wore the same as some other person.Find the numbers on the shirts of the enemy and the kidnapped person.
Input
The input is a single line containing space-separated positive integers from 1 to F.
Output
The output should be a single line containing the shirt numbers of the enemy and kidnapped person separated by a space.
Explanation
The given array is 3 1 5 2 1.
In the range from 1 to 5, the number 1 has occured twice and 4 is the missing number. So, 1 belongs to the enemy's shirt, and 4 belongs to kidnapped.Hence, the output should be 1 4.
Sample Input1
3 1 5 2 1
Sample Output1
1 4
Sample Input2
1 2 2 4
Sample Output2
2 3
Repeated Numbers
Eren wants to decode a number.After lots of trial and error, he finally figured out that the number is a count of repeated single-digit integers.
Write a program to help Eren print the decoded number given a string of integers N.
Input
The first line contains a string of integers N.
Output
The output contains a single integer representing count of repeated numbers in the input.
Explanation
For N = 212311 ,
1 and 2 are repeated.Therefore, the output is 2.
Sample Input1
212311
Sample Output1
2
Sample Input2
111
Sample Output2
1
Maximum Number of Books
There are multiple (T) bookstores in the area.Each shopkeeper has a list of B integers that represents the cost of each book.You have different pocket money(P) for each bookstore.Write a program to calculate the maximum number of books you can buy in each store with the corresponding pocket money.
Explanation
Given P = 600 and B = [120, 140, 110, 180, 120, 110] with a pocket money of 600, we can buy the books at index 0,1,2,4,5 , whose sum is 120+140+110+120+110 is equal to P.
Given P = 300 and B = [120 110 1300 130] with a pocket money of 300, we can buy the books at index 0,1 whose sum is 120 + 110 and is less than P.
Given P = 100 and B = [220 1000 500 2000] with pocket money of 100, we can't buy any book. So the output should be Retry.
Sample Input1
3
6 100
20 40 10 80 20 10
4 70
20 10 300 30
4 200
220 1000 500 2000
Sample Output1
5
3
Sample Input2
2
8 250
2070 1350 365 2750 30 20 140 240
4 500
1070 2893 2200 39
Sample Output2
3
1
Write a C program to accept dimensions of a cylinder and display the surface area and
volume of cylinder.
A basket contains of three fruits has to be created using apples and mangoes
Saurabh believes that the optimal fruit basket of three fruits should
consist of one
Apple and two mangoes. Adish believes that the two apples and one mango. fruit basket should have
There are A apples and B mangoes. Can you calculate what maximum number of imar.chine baskets that can be formed?
Input Format
The first line contains an integer, A, denoting the number of apples.
The next line contains an integer, B, denoting the the number of mangoes.
constrants
1 <=A<= 10^5
1 <= B <= 10^5
Sample
1
2
1
Sample Output
are only 2 fruits in total, hence no optimalees baskets can be
Only one optimal basket can be made be (A, M, M), where A represents an Apple, and M represents a Mango. niteeshkuma
3 optimal fruit baskets can be made i.e (A, M. M) (A, M, M), (A, A, M). where A represents an Apple, and M represents a Mango itees