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
gladu [14]
2 years ago
13

Edhesive Assignment 8: Personal Organizer.

Computers and Technology
1 answer:
Rudik [331]2 years ago
5 0

In this exercise we have to use the knowledge in computational language in python to write the following code:

<h3>What is input?</h3>

Python's input function takes a single parameter which is a string. This string is often called a prompt because it contains informational text that tells the user to type something. For example, you can call the input function as follows:

So in an easier way we have that the code is:

<em>eventName = []</em>

<em>eventMonth = []</em>

<em>eventDay = []</em>

<em>eventYear = []</em>

<em>def addEvent():</em>

<em>userEventName = input("What is the event: ")</em>

<em>userEventMonth = int(input("What is the month (number): "))</em>

<em>userEventDay = int(input("What is the date: "))</em>

<em>userEventYear = int(input("What is the year: "))</em>

<em>userEventMonth = validateMonth(userEventMonth)</em>

<em>userEventDay = validateDay(userEventMonth, userEventDay, userEventYear)</em>

<em>eventName.append(userEventName)</em>

<em>eventMonth.append(userEventMonth)</em>

<em>eventDay.append(userEventDay)</em>

<em>eventYear.append(userEventYear)</em>

<em>def validateMonth(month):</em>

<em>if month >= 1 and month <= 12:</em>

<em>return month</em>

<em>else:</em>

<em>return 1</em>

<em>def validateDay(month,day,year):</em>

<em>if day < 1 or day > 31:</em>

<em>return 1</em>

<em>if month == 2:</em>

<em>isleap = False</em>

<em>if year%4 == 0:</em>

<em>if year%100 == 0:</em>

<em>if year%400 == 0:</em>

<em>isleap = True</em>

<em>else:</em>

<em>isleap = True</em>

<em>if isleap:</em>

<em>if day <30:</em>

<em>return day</em>

<em>else:</em>

<em>return 1</em>

<em>else:</em>

<em>if day < 29:</em>

<em>return day</em>

<em>else:</em>

<em>return 1</em>

<em>if month in [1,3,5,7,8,10,12]:</em>

<em>return day</em>

<em>if month in [4,6,9,11] and day < 31:</em>

<em>return day</em>

<em>else:</em>

<em>return 1</em>

<em>def printEvents():</em>

<em>print("EVENTS")</em>

<em>months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']</em>

<em>for index in range(len(eventName)):</em>

<em>print(eventName[index])</em>

<em>print("Date: "+months[eventMonth[index] -1]+ " " + str(eventDay[index]) + ", " + str(eventYear[index]))</em>

<em>userChoice = "yes"</em>

<em>while userChoice.upper() != "NO":</em>

<em>addEvent()</em>

<em>userChoice = input("Do you want to enter another event? NO to stop: ")</em>

<em>printEvents()</em>

See more about python at brainly.com/question/18502436

You might be interested in
I'm curious why I would need to know this on a school learning site.
zhannawk [14.2K]
no idea either lol, I mean school forces you to learn





..
4 0
3 years ago
If you have a database with birthdates, and you would like to find everyone who was born before June 16, 1967, what would you en
Tcecarenko [31]

Answer:

<June 16,1967

Explanation:

7 0
4 years ago
Read 2 more answers
if you want to present slides to fellow students and co-workers which productivity software should you use to create them?
ladessa [460]

Answer:

Microsoft PowerPoint.

Explanation:

Because, it is industry standard and widely recognized and used in world.

8 0
3 years ago
______is a multimodal application software platform. the centrealized and shared database system ties the entire organization to
m_a_m_a [10]

Answer:

ERP.  

Explanation:

Enterprise Resource Planning Is the software platform for bidirectional applications. The main objective of  ERP it shared the database system and connects the enterprise as a whole so that data can be reached the once and made accessible to all users.

The main advantage of Enterprise Resource Planning is that Enterprise cycle parallelization or optimization it also the boost performance of the organization and saving the time.

3 0
3 years ago
How is AI used in racing ?
NikAS [45]
This now allows human pilots to race together with AI drivers. The AI driver is, in this case, the intelligent software that gathers all data from the sensors and other touchpoints to drive the car.
3 0
3 years ago
Other questions:
  • When a range of IP addresses is set aside for client devices, and one of these IPs is issued to these devices when they request
    14·1 answer
  • The federal government is the largest employer of cybersecurity professionals true or false
    5·1 answer
  • T F Changes to a function parameter always affect the original argument as well.
    15·1 answer
  • What is the definition of the word uproot?
    15·1 answer
  • Historically, storytelling passed down the most important ideas about life, family, and society from generation to generation; t
    10·2 answers
  • Multi-part question:
    13·1 answer
  • Please answer.
    9·1 answer
  • How does the dns solve the problem of translating domain names like example.com into ip addresses?
    10·1 answer
  • Tick the best alternatives 1. Which one of the following is input device? a) Speaker b) Printer c. Monitor d. Mouse​
    8·2 answers
  • 8. Choose the 3 correct statements for the code below.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!