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
Travis sends Suri what purports to be a link to an e-birthday card, but when she clicks on the link, software is downloaded to h
12345 [234]

Answer:

Identity Theft

Explanation:

Identity theft is the act of someone who obtains details about someone else illegally.  This is done to find personal and financial information such  name, address,social security number, passwords, and credit card number, phone number, e-mail, etc. Then the hacker can use this information to control bank accounts, e-mails, computers, portray himself as you are, or sell information to someone else.

3 0
3 years ago
Given a long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800)
Alexxandr [17]

Answer:

See explanation!

Explanation:

Here we have a program written in C++ language. Each // symbol is a relative comment explaining the reason for each command line (and is not included during the program execution).

<em>The Program: </em>

#include <iostream>

<em>//c++ build in library</em>

using namespace std;

<em>//main code body starts here</em>

int main()

{

 <em> //declare variable to store phone numbers,its area code, prefix and line    number.</em>

  long pnumber;   <em>//declare long variable</em>

  int ac, prefix, lnumber;

 <em> //declare integer variables, where ac: Area Code and lnumber is the Line Number</em>

  cout<<"Enter a 10-digit Phone Number: "<<endl;

  <em>//cout command prints on screen the desired message</em>

  cin>>pnumber;

 <em> //cin command enables the user to interact with the programm and enter information manually</em>

 <em> //main body to obtain the desired output starts below</em>

<em>   //each 'division' is used to allocate the correct value at the correct </em>

<em>   //since prefix is used to get the desired output of ( )    -</em>

  ac = pnumber/10000000;

  prefix = (pnumber/10000)%1000;

  lnumber = pnumber%10000;

 <em> //main body ends here</em>

  cout<<"Based on your 10-digit number"<<endl;

  cout<<"below you have (AreaCode), Prefix, and - line number "<<endl;

  cout<<"("<<ac<<")"<<""<<prefix<<"-"<<lnumber<<endl;

 <em> //Prints on screen the desired output of the long 10 digit Number</em>

  return 0;<em> //ends program</em>

}

-------------------------------------------------------------------------------------------------------

<em>The Output Sample:</em>

Enter a 10-digit Phone Number:

8019004673

Based on your 10-digit number

below you have (Area Code), Prefix, and - line number

(801) 900-4673

<em>....Programm finished with exit code 0</em>

8 0
3 years ago
16 POINTS
Nostrana [21]
It think it's a Nested List.
Im so sorry if this is wrong
6 0
3 years ago
What is the default file extension for a document created in Word 2016​
navik [9.2K]

Office Open XML (OOXML) format was introduced with Microsoft Office 2007 and became the default format of Microsoft Word ever since. Pertaining file extensions include: .docx – Word document. .docm – Word macro-enabled document; same as docx, but may contain macros and scripts.

7 0
4 years ago
Guidelines on how to write a report on how technology has affected office duties
UNO [17]

Answer:

weweweweweewewwewweewewweeew

Explanation:

weweweweewweweweewweewweewewew

5 0
3 years ago
Other questions:
  • A(n) _____ is a fake online persona created to promote a particular point of view, often in praise of a firm, product, or indivi
    15·1 answer
  • A car moves down the street at 45 kph. The driver takes his foot off the gas pedal but does not brake. Which is the correct expl
    5·2 answers
  • REEEEEEE I STILL NEED MORE AESTHETIC USERNAMES TO GO OFF OF PWEASE HELP IMA HAVE A PANIC ATTACK!!!... next post ima do a vote :&
    13·1 answer
  • The point where a row and column intersect is called a/an A. cell. B. axis. C. element. D. table.
    7·2 answers
  • 6) Sometimes it is difficult to read a piece of code and understand what the code will do. For this reason, you may want to add
    9·1 answer
  • Assume that PrecinctReport is a structured type with these fields, address (a string), and three int fields which are counts of
    9·1 answer
  • WILL MARK BRAINILY!!
    9·2 answers
  • What is the first law of thermodynamics?
    5·2 answers
  • Aisha designed a web site for her school FBLA club and tested it to see how well it would resize on different systems and device
    5·1 answer
  • What dod instruction implements the dod cui program
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!