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
If you need to multiply 50 and 8 and divide by 2, what would you type on the numerlc keypad?
nata0808 [166]

Answer:

50*8/2

The asterisk is the multiplication sign and the parenthesis is the division.

I've never used an apostrophe for a multiplication sign before, but I'm guessing multiplication is what it stands for.

Explanation:

4 0
3 years ago
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
bogdanovich [222]

Answer:

True

Explanation:

3 0
3 years ago
Jose wants to be sure maintains a high credit score as he is planning yo buy a new car soon what should he do to ensure his scor
Vika [28.1K]
Make his payments on time
7 0
3 years ago
Read 2 more answers
Wesellyoubuy, a consumer electronics company, received consumer complaints about its employees not being able to communicate wit
Salsk061 [2.6K]

Answer:

customer satisfaction

Explanation:

The consumer electronics company started a new training program for the consumer service employees as the company found that the consumer service employees were following the same strategy to address all types of consumer issues due to which they were not able to communicate with consumers properly.

This leads to improvement in service ratings and sales.

In this scenario, the consumer service team improved <u>customer satisfaction</u>

5 0
3 years ago
When thinking of laptops, which brands come to mind?
user100 [1]

Answer:

apple and chrome brands come to mind

5 0
3 years ago
Read 2 more answers
Other questions:
  • Where should fire extinguishers be stored on a boat?
    7·1 answer
  • Earning wise scope of web and mobile app development
    11·1 answer
  • When trying to solve a problem, Bret uses a logical, step-by-step formula called ________.
    15·1 answer
  • Identify one type of business or organization that you believe would have serious risks if they chose to use VLANs and/or VPNs.
    5·1 answer
  • .Statements using the ___________ class are explicit conversions.
    8·1 answer
  • Your company shares a building with a competitor's branch office. Recently, you noticed that some computers other than company c
    14·1 answer
  • What cannot be performed using windows task manager
    10·1 answer
  • Grooves and polished surfaces on desert pebbles are most likely caused by
    10·1 answer
  • What piece of hardware directs traffic between the connected devices when two LAN's are communicating across the Internet?
    8·1 answer
  • How can one create an online professional network using Face book?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!