Question: The program should prompt the user to enter the numeric code on the fruit's sticker. Codes that are 4 digits long indicate that the fruit
- The program should prompt the user to enter the numeric code on the fruit's sticker.
- Codes that are 4 digits long indicate that the fruit has been grown conventionally.
- In this case, print the message: "Your fruit was grown conventionally, with the use of pesticides and chemicals."
- Codes that are 5 digits long, and start with an 8, indicate that the fruit has been genetically modified.
- In this case, print the message: "Your fruit was genetically modified."
- Codes that are 5 digits long, and start with a 9, indicate that the fruit was grown organically.
- In this case, print the message: "Your fruit was not genetically modified, and was grown according USDA organic standards."
- Additionally, your code should use exactly two sets of if-else statements for full credit (note that the use of else if is not allowed on this assignment).
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
