Count of mondays in python assignment expert

Weekends

Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2).

The date in string format is like "8 Feb 2021".Input

The first line of input will contain date D1 in the string format.

The second line of input will contain date D2 in the string format.Output

The output should be a single line containing two integers separated by space.Explanation

For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are

"30 Jan 2021" is a Saturday

"31 Jan 2021" is a Sunday

"6 Feb 2021" is a Saturday

"7 Feb 2021" is a Sunday

"13 Feb 2021" is a Saturday

"14 Feb 2021" is a Sunday

So the output should be

Saturday: 3

Sunday: 3

Sample Input 1

25 Jan 2021

14 Feb 2021

Sample Output 1

Saturday: 3

Sunday: 3

Weekends

Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2).

The date in string format is like "8 Feb 2021".Input

The first line of input will contain date D1 in the string format.

The second line of input will contain date D2 in the string format.

Output

The output should be a single line containing two integers separated by space

Explanation

For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are

"30 Jan 2021" is a Saturday

"31 Jan 2021" is a Sunday

"6 Feb 2021" is a Saturday

"7 Feb 2021" is a Sunday

"13 Feb 2021" is a Saturday

"14 Feb 2021" is a Sunday

output

Saturday: 3

Sunday: 3

Sample Input 1

25 Jan 2021

14 Feb 2021

Sample Output 1

Saturday: 3

Sunday: 3

Sample Input 2

25 May 2019

22 Dec 2021

Sample Output 2

Saturday: 135

Sunday: 135

Last update on August 19 2022 21:51:51 (UTC/GMT +8 hours)

Python Datetime: Exercise-24 with Solution

Write a Python program to count the number of Monday of the 1st day of the month from 2015 to 2016.

Sample Solution:

Python Code:

import datetime
from datetime import datetime
monday1 = 0
months = range(1,13)
for year in range(2015, 2017):
    for month in months:
        if datetime(year, month, 1).weekday() == 0:
            monday1 += 1
print(monday1)

Sample Output:

3

Flowchart:

Count of mondays in python assignment expert

Visualize Python code execution:

The following tool visualize what the computer is doing step-by-step as it executes the said program:

Python Code Editor:

Contribute your code and comments through Disqus.

Previous: Write a Python program to add a month with a specified date.
Next: Write a Python program to print a string five times, delay three seconds.

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at Thank you

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at Thank you

Letter, Digit or Special Character

This Program name is Letter, Digit or Special Character. Write a Python program to Letter, Digit or Special Character, it has two test cases

The below link contains Letter, Digit or Special Character question, explanation and test cases

https://drive.google.com/file/d/1iGIZxhoPoL67KNkroEgQpaIo3Vh8w7dE/view?usp=sharing

We need exact output when the code was run

Special Characters

Write a program to count Vowels and Consonants in string.Input

The input will be a single line containing a string s.Output

The first line of output should contain no of Vowels in the given string

The second line of output should contain no of Consonants in the given stringExplanation

For example, if the given string is "Good Morning"

Vowels in the string "Good Morning" are "o, i" and their count is 4.

Remaining characters in the string are consonants their count is 7.

The First line of output is 4\nThe second line of output is 7.

HelpwithAssignment provides the best python programming experts

Python is one of the best computer programming subject that enhances the computation skills of students. HelpwithAssignment.com inspires the students to gain a thorough knowledge of the subject through our top-notch write-ups and Python programming homework help. Our unique expertise and highly efficient work process have helped us to stand out of the crowd. Our Python programming experts are equipped with top skills and techniques to provide the best Python programming assignment help.

Problems faced by students while preparing their Python programming assignment

With years of expertise and experience in serving Python programming assignments to students, HelpwithAssignment.com has reached an estimation of the frequent issues faced by students. Here are some of the problems that students face while writing their Python assignment

Deficient coding skills

The top most problem is difficulty in learning Python programming codes. Most of the learner face difficulty in comprehending the fairly odd characters in source code.

Inattentive approach

Lack of attention hinders the focus of the student from the important elements which are useful for the assignment. Students should pay heed to every minute detail of Python programming in order to create a well-versed python programming assignment.

Confusing Python codes

Beginners are unable to spot the significant differences between two pieces of codes which are slightly different. Programmers who have inadequate knowledge find it difficult to acknowledge the difference. So, they implement the wrong codes out of confusion and seek Python programming assignment help.

Plagiarism

Many student feel that Python programming incomprehensible. Confused by the system of Python coding, majority of students commit the mistake of copy-pasting programs from other’s work. If get caught by the university, it is a serious crime that can cancel the degree of the student. Hence, they approach for Python programming assignment help.

Insufficient practice

One can only gain a firm grasp of the difficult codes of Python programming through practice. Students are pre-occupied with numerous activities and find less time to practice their programming language task. So they finally end up drafting unsound assignments on Python.

Why HelpwithAssignment.com is the best for Python programming assignment help

Customized Solutions: We can’t use the same type of solution for all the tasks. Our panel of Python assignment experts go thoroughly through the instructions given by your professor and delivers exactly what is being asked for.

24X7 Customer Care Support: It might happen that your professor suggested a particular things to be mentioned in your assignments and you completely forgot to mention that to us. You don’t need to worry as you can just leave a message with our customer care executive and the message will be delivered to the expert, dedicatedly working for your project.

Timely Delivery: Don’t worry about the deadline after subscribing to our services. We deliver your work, much before deadline! Even if it is on a very short notice, we can guarantee that you will get your Python programming assignment within the given time. The idea is to let you go through our work before you make the final submission. Sounds cool?

Status Check: Suppose the deadline is next Friday. But you cannot stop worrying about the progress of the work, this Monday. We understand your concern and so you can ask for a status check or work being done till date and our experts will share the status with you and incorporate any feedback you require. We have live assignment help to make you score high and also assignment checker where you can check the progress of your assignment help assignment.

Chat with the Assignment Expert: Sometimes communicating with customer care executive is a bit difficult since you need to deliver a specific message which only the expert with his/her knowledge and experience can understand. We at HelpWithAssignment allow you to have one-to-one interaction with our experts so that you get exactly what you need.

Highly Qualified Experts: All our experts hold Ph.D. in specific subjects and these guys have been writing research reports and assignments for a decade now. So whatever your professor asks you to deliver, be rest assure that our experts will know how to deal with it.

Cash Back Guarantee: Sometimes things just don’t work out! May be you have done the assignment yourself and you no longer is satisfied with the solution we have sent. Then we promise full cash back. However, to be very frank and honest, no one yet has asked for a cash back, yet from us!

Affordable Solutions: We know that you are students and have limitations as far as spending capacity is concern. Our packages are highly affordable and whether you take help only once or for your entire semester, our rates are on the lower side.

Are You Struggling With Python Programming Assignment Help?

Then you can get help from our experts at . You can also submit your work at Submit Work. Our experts available 24/7 at HelpwithAssignment.com. Our experts deliver well-written Python Programming Assignment help within the deadline.