Question: Hello there are 2 questions I need help writing a program in Python language at a beginner level. 1) This is a simple introduction to
Hello there are 2 questions I need help writing a program in Python language at a beginner level.
1) This is a simple introduction to Decisions or if (if/else) statements. You will need two input statements and then a decision statement to compare the values.
Write a program that takes in two integers and outputs the larger value. If the two integers are the same, output the integers' value.
Ex: If the input is:
4 2 the output is:
4 2) Remember you can use the len method to compare the lengths of strings.
Write a program that takes in two strings and outputs the longest string. If they are the same length then output the second string.
Ex. If the input is:
almond pistachio the output is:
pistachio
Step by Step Solution
There are 3 Steps involved in it
1 Program to find the larger of two integers or output the same value if they are equal python Take ... View full answer
Get step-by-step solutions from verified subject matter experts
