Answer:
def find_max(num_1, num_2):
max_val = 0.0
if (num_1 > num_2): # if num1 is greater than num2,
max_val = num_1 # then num1 is the maxVal.
else: # Otherwise,
max_val = num_2 # num2 is the maxVal
return max_val
max_sum = 0.0
num_a = float(input())
num_b = float(input())
num_y = float(input())
num_z = float(input())
max_sum = find_max(num_a, num_b) + find_max(num_y, num_z)
print('max_sum is:', max_sum)
Explanation:
I added the missing part. Also, you forgot the put parentheses. I highlighted all.
To find the max_sum, you need to call the find_max twice and sum the result of these. In the first call, use the parameters num_a and num_b (This will give you greater among them). In the second call, use the parameters num_y and num_z (This will again give you greater among them)
Answer:
It will be a java code.
Explanation:
import java.util.Scanner;
public class StringInputStream {
public static void main (String [] args) {
Scanner inSS = null;
String userInput = "Jan 12 1992";
inSS = new Scanner(userInput);`
String userMonth = "";
int userDate = 0;
int userYear = 0;
/* Your solution goes here */
System.out.println("Month: " + userMonth);
System.out.println("Date: " + userDate);
System.out.println("Year: " + userYear);
return;
}
}
The car owner acquired his car because the car dealer offers him a financing credit services. It is part of the contract that the car owner should pay in monthly basis. It is a fact and part of the contract also that once the car owner failed to pay 2 months of his contribution, the car dealer will get his car back.
Answer:
It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theatre performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey.
Explanation:
It was Halloween morning, in 1938, Orson Welles opened his eyes just to discover himself as the most trending person in the USA. Just the past night, Welles together with his Mercury Theater performed the radio adaption of the Wars of the Worlds, written by H.G. Wells. He transformed around 40 years old novel into the false news edition which broadcasted the news of Martian attack on New Jersey. Just previously it was Halloween night, and hence, this was expected. And various listeners of the show were shocked, and they made a lot of crazy calls to the nearby Police Stations, as well as the newspaper publication houses. The radio stations tried to convince various journalists that the radio episode was able to cause hysteria throughout the USA. And by the very next dawn, the front column of each new newspaper from coast to coast together with the headlines related to the huge panic inspired allegedly by the CBS broadcast.
Answer:
public class Date{
Public Date(int month,int day,int year){
}
}
void main(){
Date datep=new Date(3,12,2006);
}
Explanation:
Here we declared a class "Date" and defined one public constructor which will take month,day and year. In main we created an object to that Date class by invoking this parameterized constructor and assigned that object to "dateap" Date variable