Greatest Among Four Numbers
Given four integers, write a program to print the greatest value among the four numbers.
Input
The first line of input will be an integer.
The second line of input will be an integer.
The third line of input will be an integer.
The fourth line of input will be an integer.
Output
The output should be a single line containing the greatest number.
Explanation
For example, if the given numbers are 5, 3, 7, 2. As 7 is the greatest among the four numbers, so the output should be 7.
Test Case 1:-
Input:-
5
3
7
2
Output:-
7
Test Case 2:-
Input:-
11
11
11
11
Output:-
11
We need all test cases can be came when code was run. I want exact outputs for all test cases
Create an algortihm 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.
LINK PHOTO:
https://www.google.com/search?q=tower+of+hanoi+image&source=lnms&tbm=isch&sa=X&ved=2ahUKEwi6veGsgMPwAhVVFogKHVD6D2IQ_AUoAXoECAEQAw&biw=1366&bih=657#imgrc=W_DnmKgBwq_XxM
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"
Area of rectangle
What is the main difference between the PC and Apple is?”
Repeating & Non-Repeating Numbers
Given a list of numbers, find and print, the first number that occurs only once in the list and the first number that occurs more than once in the list.
The input will be a single line containing space-separated integers.
The first line of the output should contain the first non-repeating number. The second line of output should contain first repeating number. If there is no number fitting the given criteria, print "None" instead.
For example, if the given list of integers are 5, 5, 4, 7, 4, 1, 11 , the first non-repeating number is 7 and the first repeating number is 5.
Sample Input 1
5 5 4 7 4 1 11
Sample Output 1
7
5
Sample Input 2
1 2 3 4 5 6 7 8 9
Sample Output 2
1
None
Write a program that reads all the match outcomes and summarizes the information of all the matches.
Points are given to the teams based on the outcome of the match.
A win earns a team 3 points. A draw earns 1. A loss earns 0.
The following information is expected:
MP: Matches Played
W: Matches Won
D: Matches Drawn (Tied)
L: Matches Lost
P: Points
The team information should be displayed in descending order of points.
Numbers in String - 2
Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.
Input
The input will be a single line containing a string.
Output
The output should contain the sum and average of the numbers that appear in the string.
Note: Round the average value to two decimal places.
Explanation
For example, if the given string is "I am 25 years and 10 months old", the numbers are 25, 10. Your code should print the sum of the numbers(35) and the average of the numbers(17.5) in the new line.
Sample Input 1
I am 25 years and 10 months old
Sample Output 1
35
17.5
Sample Input 2
Tech Foundation 35567
Sample Output 2
35567
35567.0
Sample input 3
1time3 %times4
sample output 3
8
2.67
please provide correct output codeNumbers in String - 1
Given a string, write a program to return the sum and average of the digits of all numbers that appear in the string, ignoring all other characters.
Input
The input will be a single line containing a string.
Output
The output should contain the sum and average of the digits of all numbers that appear in the string.
Note: Round the average value to two decimal places.
Explanation
For example, if the given string is "I am 25 years and 10 months old", the digits of all numbers that appear in the string are 2, 5, 1, 0. Your code should print the sum of all digits(8) and the average of all digits(2.0) in the new line.
Sample Input 1
I am 25 years and 10 months old
Sample Output 1
8
2.0
Sample Input 2
Tech Foundation 35567
Sample Output 2
26
5.2
Sample Input 3
Anjali25 is python4 Expert
Sample Output 3
11
3.67
correct output is given the code