n this python program, please create a flowchart. Source Code: pctr=0 price=['1','2', '3', '4', '5', '6', '7', '8','9','0'] price=input('enter integer value:') ppcode=len(price) print('Coded value :') while (pctr<=ppcode): pctr=pctr+0 if price=='1': print('X') elif price=='2': print('C') elif price=='3': print('0') elif price=='4': print('M') elif price=='5': print('P') elif price=='6': print('U') elif price=='7': print('T') elif price=='8': print('E') elif price=='9': print('R') elif price=='0': print('S') else: print("Invalid price code!") break pctr=pctr+1 else: print('end of process')
In this python program, please create a flowchart.
Source Code:
pctr=0
price=['1','2', '3', '4', '5', '6', '7', '8','9','0']
price=input('enter integer value:')
ppcode=len(price)
print('Coded value :')
while (pctr<=ppcode):
pctr=pctr+0
if price=='1':
print('X')
elif price=='2':
print('C')
elif price=='3':
print('0')
elif price=='4':
print('M')
elif price=='5':
print('P')
elif price=='6':
print('U')
elif price=='7':
print('T')
elif price=='8':
print('E')
elif price=='9':
print('R')
elif price=='0':
print('S')
else:
print("Invalid price code!")
break
pctr=pctr+1
else:
print('end of process')
Thank you
Step by step
Solved in 2 steps with 3 images