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]
2 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]2 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
Problem 1. MST - Prim's and Kruskal's algorithms
Juli2301 [7.4K]
Or maybe not Encryption converts the data in a database to a format that is indecipherable to unauthorized users who attempt to bypass the DBMS.

a. True
b. False
7 0
3 years ago
Plz answer me will mark as brainliest​
julia-pushkina [17]
The processor is called the CPU
8 0
3 years ago
Read 2 more answers
Imagine that you are helping a customer needing technical assistance for a printer they recently purchased. They bought the prin
Lisa [10]
If you happen to meet that kind of problem, the most appropriate series of steps to take in troubleshooting the issue is that first, are there steps that i haven't done? If there's no power even if it is plugged in, try to check the wire. Look for a different wire cable and connect it to your printer. If it still does not work, then check it over to the service center.
3 0
3 years ago
Read 2 more answers
.What is Social Media"?
nadezda [96]

Answer:

Social media is an internet-based form of communication. It facilitates the users the sharing of ideas, thoughts and information, and create web content.

There are many forms of social media, like blogs, photo-sharing sites, virtual words, etc.

8 0
2 years ago
In this lab, you create a programmer-defined class and then use it in a C++ program. The program should create two Rectangle obj
MakcuM [25]

The program based on the information given is illustrated below.

<h3>What is a program?</h3>

A computer program simply means a sequence of instructions in a programming language that is created for a computer to execute.

It should be noted that computer programs are among the component of software.

The program to create two rectangle objects and get their area and perimeter is depicted:

// Rectangle.cpp

using namespace std;

class Rectangle

{

public:

// Declare public methods here

void setLength(double);

void setWidth(double);

double getLength();

double getWidth();

double calculateArea();

double calculatePerimeter();

private:

// Create length and width here

double length, width;

};

void Rectangle::setLength(double len)

{

length = len;

}

void Rectangle::setWidth(double wid)

{

// write setWidth here

width = wid;

}

double Rectangle::getLength()

{

// write getLength here

return length;

}

double Rectangle::getWidth()

{

// write getWidth here

return width;

}

double Rectangle::calculateArea()

{

// write calculateArea here

return length*width;

}

double Rectangle::calculatePerimeter()

{

// write calculatePerimeter here

return 2*(length+width);

}

// This program uses the programmer-defined Rectangle class.

#include "Rectangle.cpp"

#include <iostream>

using namespace std;

int main()

{

Rectangle rectangle1;

Rectangle rectangle2;

rectangle1.setLength(10.0);

rectangle1.setWidth(5.0);

rectangle2.setLength(7.0);

rectangle2.setWidth(3.0);

cout << "Perimeter of rectangle1 is " << rectangle1.calculatePerimeter() << endl;

cout << "Area of rectangle1 is " << rectangle1.calculateArea() << endl;

cout << "Perimeter of rectangle2 is " << rectangle2.calculatePerimeter() << endl;

cout << "Area of rectangle2 is " << rectangle2.calculateArea() << endl;

return 0;

}

/*

output:

The perimeter of rectangle1 is 30

The area of rectangle1 is 50

The Perimeter of rectangle2 is 20

The area of rectangle2 is 21

*/

Learn more about program on:

brainly.com/question/1538272

#SPJ1

8 0
1 year ago
Other questions:
  • These devices: monitor, earphone, speakers are examples of what? Input devices Storage devices Output devices All answer are cor
    10·2 answers
  • Checking tire pressure should be performed:
    11·2 answers
  • Why might a government entity choose to offer some information and services online as in e-government
    8·2 answers
  • The first computer introduced was the IBM PC. A. True B. False
    11·2 answers
  • A circular copper disk of diameter D=10 cm rotates at frequency =1800 rev/min about an axis through its center and at right angl
    15·1 answer
  • A ___________ is a variable used to pass information to a method.
    11·2 answers
  • Why is drive of value when pursuing a career in IT?
    14·1 answer
  • 4.3 Code Practice: Question 1
    12·2 answers
  • Describe how you will lunch a web browser using the start menu​
    6·2 answers
  • Why is computer economics important?​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!