Answer to Question #272869 in C++ for nadia

Question #272869
  1. Design a nested structure by considering the production of at least 5 fruits in Pakistan’s provinces. Consider suitable attributes of fruits, names of use defined constructs must be user friendly. Use proper string messages to make your program readable.  
1
Expert's answer
2021-11-29T00:00:09-0500
l = []
i = 0
while True:
    s = input("Input the fruit names: ")
    if len(s) < 5:
        print("Name is not illigable")
    else:
        l.append(s)
        i += 1
    if i == 5: break
print(*l)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS