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]
2 years ago
6

Python exercise grade 10

Computers and Technology
1 answer:
guapka [62]2 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
A web application consists of one or more web pages. group of answer choices true false
algol [13]

Answer:

true

Explanation:

web application is a software or program which is accessible using any web browser.

5 0
1 year ago
Consider the following import statement in Python, where statsmodels module is called in order to use the proportions_ztest meth
den301095 [7]

Answer:

a. count of observations that meet a condition (counts), total number of observations (nobs), Hypothesized value of population proportion (value).

Explanation:

In other to use the proportion_ztest method, the need to make import from the statsmodel module ; statsmodels.stats.proportion.proportions_ztest ; this will allow use use the Z test for proportion and once this method is called it will require the following arguments (count, nobs, value=None, alternative='two-sided', prop_var=False)

Where;

nobs = number of observations

count = number of successes in the nobs trial or the number of successes for each independent sample.

Value = hypothesized value of the population proportion.

7 0
3 years ago
An interrupt priority scheme can be used to ____. allow the most urgent work to be finished first make it possible for high-prio
Nana76 [90]

Answer:

All of the above

Explanation:

An interrupt priority scheme is a system which decides the priority at which various work is done and it perform all of the above mention task so therefore all of the above is the right answer.

5 0
3 years ago
Which of these is a way that a doctor can examine a patient?
SIZIF [17.4K]

Answer:

D. all the above

Explanation:

because doctor uses stethoscope to listen patients heart, he also used hammer to check patients reflexes and also doctor has to listen to the patient.

5 0
3 years ago
Consider the language defined by the following regular expression. (x*y | zy*)* Does zyyxz belong to the language? Yes, because
Mrrafil [7]

Answer:

Consider the language defined by the following regular expression. (x*y | zy*)* 1. Does zyyxz belong to the language?

O. No, because zyy does not belong to x*y nor zy*

2. Does zyyzy belong to the language?

Yes, because both zy and zyy belong to zy*.

Explanation:

4 0
3 years ago
Other questions:
  • Don is the superintendent of the county school system. What task might Don
    8·1 answer
  • Any program that allows the user to select an item from a menu should ________ the user's selection.
    7·1 answer
  • nside of your organization that checks how often client machines access it. If a client machine hasn't accessed the server in th
    6·1 answer
  • Design the logic for a program that allows a user to enter 20 numbers, then displays each number and its difference from the num
    13·1 answer
  • When you're working with a word processing document and you press the DEL Key what happens
    7·2 answers
  • What is the definition of the word uproot?
    15·1 answer
  • List 10 examples of computer ethics<br>(please give even 1 if you can, I need it urgently) ​
    10·1 answer
  • Why is my speedtest is very good but chrome is slow
    11·1 answer
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
  • Discussion Topic
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!