Home > Java > javaTutorial > Methods and examples of implementing New Year greetings in Java

Methods and examples of implementing New Year greetings in Java

王林
Release: 2023-04-21 09:40:17
forward
996 people have browsed it
<code><p><br>from datetime import datetime<br>import pprint<br><br>pp = pprint.PrettyPrinter()<br><br><br>def Happy_New_year():<br>    now = datetime.now()<br>    this_year = now.year<br>    day = 1<br>    while this_year == 2018:<br>        pp.pprint("2018年第{}天: 健康,进步!".format(day))<br>        day += 1<br>        if day > 365:<br>            exit(1)<br><br>if __name__ == "__main__":<br>    Happy_New_year()<br>    <br>    <br></p></code>
Copy after login

The above is the detailed content of Methods and examples of implementing New Year greetings in Java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template