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
Varvara68 [4.7K]
3 years ago
9

Write a program that prompts the user to enter a date, using integer values for the month, day, and year, and then prints out th

e day of the week that fell on that date. According to the Gregorian Calendar, January 1, 1601 was a Monday. Observe all leap years (and keep in mind that 1700, 1800, and 1900 were not leap years).
Computers and Technology
1 answer:
attashe74 [19]3 years ago
5 0

Answer:

import datetime

user = input("Enter date in yyyy,m,d: ").split(",")

int_date = tuple([int(x) for x in user])

year, month, day =int_date

mydate = datetime.datetime(year, month, day)

print(mydate)

x = mydate.strftime("%B %d, %Y was a %A")

print(x)

Explanation:

The datetime python module is used to create date and time objects which makes it easy working with date-time values. The user input is converted to a tuple of integer items, then they are converted to date time objects and parsed to string with the strftime method.

You might be interested in
• Use variable to create the number 0 at location 0, 400.
pashok25 [27]

Answer: i thinks its

Explanation:

$('button')

 .html('Click me') // Try edit it...

 .on('click', () => console.log(''))

.on('click', () => console.log(''))

.on('click', () => console.log(''))

console.log('App started')

8 0
2 years ago
Which of the following applies to a trademark?
Lemur [1.5K]

Answer:

a

Explanation:

4 0
3 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
4 years ago
Read 2 more answers
A way to have cells in your spreadsheet change formats based on the value of the cells is called _____.
ki77a [65]
Should be conditional filtering 
8 0
3 years ago
Which of the following is a true statement about falling object safety? (1 point) A. Tools placed on work stations B. Loads drop
goblinko [34]

Answer:

B and C for the most part but mainly C.

Explanation:

6 0
4 years ago
Other questions:
  • What attributes a website indicates a more reliable source for information
    14·1 answer
  • Kwan is using JavaScript extensively to add interactivity to his Web site. Contained within his script is a counter object that
    8·1 answer
  • What argument for "the seen" suggested that breaking windows is a good thing?
    11·1 answer
  • Describe a new career in computer science that may be created in the future. Include supporting evidence in your response that s
    13·1 answer
  • Clicking this would navigate among different worksheets
    14·1 answer
  • How does an agile team obtain clarity on backing items that may be picked up in upcoming iterations? (1 correct answer)
    10·1 answer
  • Evaluate the expression. Be sure to list a value of appropriate type (e.g., 7.0 rather than 7 for a double, Strings in quotes).
    7·1 answer
  • Kerry is debugging a program. She identifies a line of code to begin execution and a line of code to end execution so that she i
    11·1 answer
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
  • What is a zerø-day exploit? No go.ogle >:(
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!