Question: Instructions Include comments for every few lines ( or even each line ) of code as relevant. Use a consistent naming convention for identifiers. Do

Instructions
Include comments for every few lines (or even each line) of code as relevant.
Use a consistent naming convention for identifiers.
Do not use internet for anything other than accessing Canvas.
Acknowledge the honor pledge in the below cell by typing your name inside the cell (just double click to make the cell editable).
Honor Pledge
1, Name Here, affirm that I will not give or receive any unauthorized help on this exam, and that all work will be my own.
Problem 1(20 pts)
Write a program that asks a user for an input. Ensure that the input contains only digits (0 to 9) separated by a single or multiple space characters. The space cannot be the first or
the last character. The program should keep prompting the user until their input is valid.
Create two numbers - one consisting of all the digits before the space(s) and the other consisting of all the digits after the space(s).
If the first number is larger, return the sum of the two numbers. If the second is larger, return the product of the two numbers. If they are the same, the program should continue
to ask for a new input
Solution
Instructions Include comments for every few lines

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!