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
Rom4ik [11]
3 years ago
6

Python exercise grade 10

Computers and Technology
1 answer:
guapka [62]3 years ago
7 0

earliest = ""

while True:

   month = int(input("Enter a date (month): "))

   day = int(input("Enter a date (date): "))

   year = int(input("Enter a date (year): "))

   if month == 0 and day == 0 and year == 0:

       break

   if month < 10:

       month = "0"+str(month)

   if day < 10:

       day = "0"+str(day)

   string_date = str(month)+"/"+str(day)+"/"+str(year)

   print(string_date)

   if earliest == "":

       earliest = string_date

   else:

       year,month,day=int(year),int(month),int(day)

       lst = list(map(int,earliest.split("/")))

       if year < lst[2]:

           earliest = string_date

       elif year == lst[2] and month < lst[0]:

           earliest = string_date

       elif year == lst[2] and lst[0] == month and day < lst[1]:

           earliest = string_date

print(earliest,"is the earliest date")

I wrote my code in python 3.8. Best of luck.

You might be interested in
Write an algorithm to create a customer’s bill for a company. The company sells only five different products. TV, VCR, Remote Co
alukav5142 [94]

Answer:

so

tv= 400$

VCR= $220

remote controller= $35

CD Player= $280

Tap recorder= $90

so total = $1025 total

here 8% sale tax increase so is 82$ so

1025-82$ = 943 total amount

increase or decrease tax according to your question :)

6 0
3 years ago
Which one of the following statements most fully describes the general capabilities of desktop publishing software?
OleMash [197]
The answer is B.
<span> desktop publishing program must be able to take text and graphics from a number of sources and allow these elements to be arranged on a page. 
The main purpose of a destkop publishing program is to aid user in creating documents using its page layout so it could generate printable media with higher quality compared to the one that is handmade.</span>
7 0
3 years ago
Which of these agents of education empowers the other..........
Tomtit [17]

Answer:

B. school

Explanation:

Because the school is where you learn and gain knowledge

4 0
2 years ago
Read 2 more answers
The point of (18 ,0) lies on​
zysi [14]
This point lies on the x value
4 0
3 years ago
Read 2 more answers
Question 5) What is a feature of podcasts?
steposvetlana [31]

Answer:

the answer is a.they rely on airwaves for broadcasting

Explanation:

i just took this test on brainly

6 0
3 years ago
Read 2 more answers
Other questions:
  • Discuss why mtv initially had a difficulty securing enough ads
    10·1 answer
  • You must have an active ____ to test external links.
    5·1 answer
  • Why might your digital footprint be important when you are applying for collage
    13·1 answer
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    5·1 answer
  • Which statement about images is correct? A) A virtual image cannot be formed on a screen. B) A virtual image cannot be viewed by
    12·1 answer
  • Recovery after a disaster involves installing the most recent ________ backup copy.
    15·1 answer
  • Which formula is used to measure accuracy?
    11·1 answer
  • How are special characters added to a Word document? Check all that apply.
    11·2 answers
  • Joe, a user, has purchased a new mobile device that uses a different OS than his previous one. Joe wants to copy his contacts an
    10·1 answer
  • How do we explain the difference between fake news and facts​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!