This is my code, my output, and expected output. Can I ask what should I do with my code to match the expected output? I marked it using a red box on how it should be. It should be: Enter num: Invalid...


This is my code, my output, and expected output. Can I ask what should I do with my code to match the expected output?


I marked it using a red box on how it should be.


It should be: Enter num:
Invalid Output


but mine's:



Enter num:



Invalid Output


Thanks a lot!


1 while (1):<br>b = int(input (
9): 9 10 11 12 13 14 15 print (m%10, end = "") 16 else: 17 print(m, end= "") 18 print('\r') 19 break Your Output (stdout) Enter num: Invalid input Enter num: Invalid input Enter num: Invalid input Enter num: Expected Output Enter num: Invalid input Enter num: Invalid input Enter num: Invalid input Enter num: "/>
Extracted text: 1 while (1): b = int(input ("Enter num:")) print() k = b-1 if(b <= 0):="" print("invalid="" input")="" continue="" 8="" else:="" for="" i="" in="" range="" (0,b):="" for="" j="" in="" range="" (0,="" k):="" print(end=" " )="" k="k-1" for="" m="" in="" range="" (0,="" 2*i+1):="" if(m=""> 9): 9 10 11 12 13 14 15 print (m%10, end = "") 16 else: 17 print(m, end= "") 18 print('\r') 19 break Your Output (stdout) Enter num: Invalid input Enter num: Invalid input Enter num: Invalid input Enter num: Expected Output Enter num: Invalid input Enter num: Invalid input Enter num: Invalid input Enter num:

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here