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
A given application written in Java runs 15 seconds on a desktop processor. A new Java compiler is released that requires only 0
barxatty [35]

Answer:

9.9 seconds instead of 15 seconds

5.1 seconds faster

Explanation:

See attached picture.

6 0
3 years ago
Use ONE SQL statement to show the total number of actual hours for each customer. In the output, show customer id and the total
valkas [14]

Explanation:

SELECT  

   distributor_id,  

   COUNT(*) AS TOTAL,  

   COUNT(IF(level='exec',1,null)),

   COUNT(IF(level='personal',1,null))

FROM sometable;

7 0
3 years ago
What is metrical task system algorithm?? and can we use that in online shopping project??
jeyben [28]

Answer:

Metrical task system algorithm is the online algorithm that is used for organizing the online problems like k-server issues, paging issues etc.This task system works in the form of metrics to decrease the complete cost  experienced due to processing of the operation and analyzing the competition.

It can be used for the online shopping project for the analyzing the comparison between the performance on basis of online and offline trends and then optimization can take place according to the the results.

7 0
4 years ago
Which of the following locations would most likely have the most fertile soil?
Nina [5.8K]
D: the side of a mountain
3 0
4 years ago
Which device is connected to a port on a switch in order to receive network traffic?
inysia [295]

Answer:

"Passive IDS" is the appropriate answer.

Explanation:

  • A framework that is designed mostly for monitoring and analyzing internet traffic operations and alerting a user or administrator about possible bugs, as well as disruptions, is known to be passive IDS.
  • This IDS cannot carry out certain preventive as well as remedial processes as well as operations by itself.
6 0
3 years ago
Other questions:
  • 7-eleven had to file for a bankruptcy. However they become a profit making company after installing an Information System that a
    12·1 answer
  • What is the biggest type of gear?<br><br>A. Spur<br>B.Worm<br>C.Wheel<br>D.Pinion
    6·2 answers
  • Original list:0,0,0,0,0,0,0,0
    10·1 answer
  • Write a function named word_count that accepts a string as its parameter and returns the number of words in the string. A word i
    10·1 answer
  • In the context of a global information system (GIS), _____ networks offer electronic data interchange standards, encryption, sec
    10·1 answer
  • When is the greatest risk of damage from electrostatic discharge?
    7·2 answers
  • if you are trying to reduce the cost of college, which of the following strategies is likely to save you the most money?
    9·1 answer
  • The tags are always enclosed within a pair of<br>(a) curly<br>(b) square<br>(©) angular​
    6·1 answer
  • Which of these is NOT an input device?
    14·1 answer
  • What are three advantages of using enterprise software in an organization?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!