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
Digital art is created by using
enyata [817]

Answer:

D. Computers

Explanation:

Digital art is when you make art on electronic devices.

8 0
3 years ago
How can you tell that a website is valid and reliable?
larisa86 [58]
If there is an about page where it tells whom made the website, as well as a copyright 2016 on the bottom of the page. This basically means the website is useful and updated by the creators. Another factor which the site doesnt always need but if it has an https at the beginning of the url then it should be good and valid because that means the site is secured. Also factor in the sections where articles are present, if they have a date and an author towards the bottom or top of the article, then it can be trusted as well. Theres a lot more you can look for in a site and validating if it is an okay site but these are a few examples. Hope this helped!:)
3 0
3 years ago
Which one of the following functional business systems supports the finance business function?
bogdanovich [222]
It seems that you have missed the given choices for this question, but anyway, here is the correct answer. The functional business systems that supports the finance business function are CASH MANAGEMENT and FINANCIAL FORECASTING. Hope this is the answer that you are looking for. 
5 0
4 years ago
Write a function in Erlang called func that takes a list of tuples and returns a new list consisting of tuples from the original
vovikov84 [41]

Answer:

Please find the complete question in the attached file.

Explanation:

Following are the code to the given question:

-module(helloworld)//use a module

-export([start/0])

start() ->//start module

func([Head Taill) ->//defining a method func that takes a parameter

{

first, second} = Head,//holding head value

if //defining if block

first > second -> func(Tail)//method func that takes a parameter

true ->

[first, second}|func(Tail)]//method func that takes a parameter

end

6 0
3 years ago
Marijuana and hashish come from the hemp plant?
raketka [301]
Yes they come from the hemp plant
5 0
4 years ago
Other questions:
  • Charlotte has set up a home maintenance service that operates out of her city. Workers commit to being available for certain hou
    13·1 answer
  • What are the links between the operating systems, the software, and hardware components in the network, firewall, and IDS that m
    7·1 answer
  • Which of these is not used by analysts when adopting CASE tools? (1 point) (Points : 1.5) communicating more effectively with us
    5·1 answer
  • What is a programming language?
    11·2 answers
  • Which task is performed by the artificial intelligence programmer?
    7·1 answer
  • What things have small motors
    13·1 answer
  • In the following data definition, assume that List2 begins at offset 2000h. What is the offset of the third value (5)?
    10·1 answer
  • &gt;What is the output of the following code:
    5·1 answer
  • Match the protocols to their use. HTTP POP3 SMTP FTP You check email in your inbox. arrowRight You send an email to a friend. ar
    14·1 answer
  • ______ view is generally used for creating, formatting and designing slide​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!