1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Luda [366]
3 years ago
13

Please help with this code!

Computers and Technology
1 answer:
kow [346]3 years ago
8 0

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.

You might be interested in
Why does atmospheric pressure does not effect on planes,jet planes and rocket?​
Dafna1 [17]

Explanation:

The atmosphere can be described as a gaseous mass surrounding and moving along with the Earth with no defined upper limit.

3 0
3 years ago
_______ are useful when you want the user to select one choice from several possible choices. Radio buttons Check boxes Buttons
gtnhenbr [62]

The radio buttons are used when only one option is to be selected from the several possible choices. Thus, option A is correct.

<h3>What are radio buttons?</h3>

Radio buttons can be understood as the elements of selection a single option amongst the multiple suitable options. The default icon for the radio buttons is the blank circle.

Therefore, option A Radio buttons is correct.

Learn more about radio buttons, here:

brainly.com/question/14316393

#SPJ1

4 0
2 years ago
"if" statements are part of creating computer programs, what are these instructions called and how would you use them?
podryga [215]

Answer:

if means that like (if this happen it will come or not come answer)

Explanation:

sorry I don't know how to tell but plz reply if you understand or not.

7 0
3 years ago
Read 2 more answers
Algorithm to print the first 10 odd numbers​
77julia77 [94]

Answer:

I have the code written in c++ but the logic will be the same you just have to change the syntax ( if you're writing different language)

Explanation:

please mark brainliest

4 0
3 years ago
if anyone is on a Chromebook, do you ever mean to press backspace, then you accidentally press the power button and think "OH CR
Pie

Answer:

every single day of my life

7 0
3 years ago
Read 2 more answers
Other questions:
  • An insulated rigid tank is divided into two equal parts by a partition. Initially, one part contains 4 kg of an ideal gas at 850
    8·1 answer
  • Select the strategies below that are likely to increase audience attention.
    14·2 answers
  • A computer company has $3840000 in research and development costs. Before accounting for these costs, the net income of the comp
    5·1 answer
  • Which of the following would help a photographer keep from dropping a camera? - - Rain hood
    6·2 answers
  • Which of the following best describes a situation where software should be upgraded instead of replaced?
    6·1 answer
  • Swapping as applied in memory management with an aid of a diagram​
    13·1 answer
  • It is where the home tab is located where you can view all the all the formatting purpose <br>​
    11·1 answer
  • I need help converting this to python but i have no idea how to.
    12·1 answer
  • WAP to find the area of cuboid​
    13·1 answer
  • Complete each sentence. To add a graphic to a Word document, start by clicking the tab. Next, click . Then, navigate to the grap
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!