![ayoismeisalex](/avatars/37485.jpg)
ayoismeisalex
22.01.2021 •
Computers and Technology
Please help with this code!
Solved
Show answers
More tips
- S Sport When will the Biathlon World Championships 2011 take place in Khanty-Mansiysk? Answers to frequently asked questions...
- O Other What is a Disk Emulsifier and How Does it Work?...
- F Family and Home What does a newborn need?...
- F Family and Home Choosing the Right Car Seat for Your Child: Tips and Recommendations...
- F Food and Cooking How to Get Reconfirmation of Registration?...
- C Computers and Internet How to Get Rid of Spam in ICQ?...
- A Art and Culture Who Said The Less We Love a Woman, the More She Likes Us ?...
- F Family and Home How to Get Rid of Your Neighbors?...
- S Society and Politics How Could Nobody Know About the Dead Mountaineers?...
- H Health and Medicine How to Cure Adenoids?...
Answers on questions: Computers and Technology
- C Computers and Technology Write a program that draws a square centered on the graphics canvas. The sides of the square should be SIDE_LENGTH and the fill should be a random choice from the COLORS list. This...
- C Computers and Technology What is a algorithm design...
- B Biology He shrimp in the photograph are small crustaceans, related to lobsters and crabs. mc023-1.jpg photo by russ hopcroft, courtesy of the noaa which specialized carbohydrate is used...
- M Mathematics Alandscaping company placed two orders with a nursery. the fist order was for 13 bushes and four trees, and totaled $487. the second order was for six bushes and two trees, and totaled...
- H History Which of the following is not an advantage of a free market economy? economic efficiency economic equity economic growth economic freedom...
- H Health Is defined as that which contains secret information such as a medical record...
- M Mathematics (05.03)calculate the area of the regular pentagon below: a regular pentagon with side length of 22.3 inches and dotted line from center to middle of side of 15.4 inches....
- H History When was nato created and what was it?...
- H History How many of the 10 commandments can be found in the laws of the united states...
- P Physics Asoccer ball is kicked to a 30-m/s speed. while being kicked, the amount of force of the player s foot on the ball is...
Ответ:
import random
months = ["jan", "feb", "mar", "apr", "may", "june", "july", "aug", "sept", "oct", "nov", "dec"]
pick1 = random.choice(months)
pick2 = random.choice(months)
if months.index(pick1) < months.index(pick2):
print(pick1)
print(pick2)
else:
print(pick2)
print(pick1)
Since the months are already in chronological order in the list, we can compare their index and print the string with the smaller index first. I wrote my code in python 3.8. I hope this helps.
Ответ: