40.1k views
5 votes
Think of your favorite modes of transportation, such as a motorcycle or a car, and make a list that stores several examples. Use your list to print a series of statements about these items, such as "I would like to own a Honda motorcycle. " IN PYTHON

User Yangsuli
by
7.8k points

1 Answer

5 votes

To create a list of different modes of transportation and print a series of statements about the items, you can use Python. Here is a sample code that demonstrates this:```
transportation = ["car", "motorcycle", "bicycle", "boat", "plane"]

for item in transportation:
if item == "car":
print("I would like to own a Honda car.")
elif item == "motorcycle":
print("I would like to own a Honda motorcycle.")
elif item == "bicycle":
print("I would like to own a Trek bicycle.")
elif item == "boat":
print("I would like to own a Bayliner boat.")
elif item == "plane":
print("I would like to fly a Boeing plane.")
```In the above code, we have created a list called "transportation" that stores different modes of transportation. We then loop through each item in the list and use if-elif statements to print a series of statements about these items. For example, if the item is "car", we print "I would like to own a Honda car."Similarly, if the item is "motorcycle", we print "I would like to own a Honda motorcycle."You can modify the list "transportation" to include your favorite modes of transportation. And you can replace the examples in the if-else statements with your own preferences.

User Fabio Manzano
by
9.0k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.