Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python program that receives two numbers from a user: num1 and num2. You program checks which is the bigger number. If the
Write a Python program that receives two numbers from a user: num1 and num2. You program checks which is the bigger number. If the bigger number is odd, then in prints the same number in different lines. On each line you print the odd number you then add'-' sign characters for as many as the smaller number. For example, if the larger number entered is odd and it is 5 and the smaller number is 3 then the output should be: 5-.. 5- 5 --- 5 --- 5 --- I However, if the larger number is even then print '+'sign characters for as many as the smaller number then in the end of the line print the even number. Repeat the printing for as many lines as the larger even number. For example, if the larger number entered is even and it is 4 and the smaller number is 2 then the output should be: ++4 ++4 ++4 ++4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Python program python def printpatternnum1 num2 largernumber ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started