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
tatyana61 [14]
3 years ago
5

The date June 10, 1960, is special because when it is written in the following format, the month times the day equals the year:

6/10/60 Design a program that asks the user to enter a month (in numeric form), a day, and a two digit year. The program should then determine whether the month times the day equals the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic.
2. Running on a particular treadmill you burn 3.9 calories per minute. Write a program that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes.

Computers and Technology
1 answer:
MrRa [10]3 years ago
7 0

Answer for Question 1:

Code for the first question:

#section 1

<em># Prompt for accurate day month and year </em>

<em>while True: </em>

<em>    try: </em>

<em>        day = int(input("Enter the day of month: ")) </em>

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

<em>            raise </em>

<em>        try: </em>

<em>            month = int(input("Enter the month in numeric form: ")) </em>

<em>            if month > 12 or month < 1: </em>

<em>                raise </em>

<em>            try: </em>

<em>                year = int(input("Enter the year in two digit format: ")) </em>

<em>                if year > 99 or year < 0: </em>

<em>                    raise </em>

<em>                else: </em>

<em>                    break </em>

<em>            except: </em>

<em>                print("Error: invalid year input.") </em>

<em>        except: </em>

<em>            print("Error: invalid month input.") </em>

<em>             </em>

<em>    except: </em>

<em>        print("Error: invalid day input.") </em>

<em> </em>

<em># We have a valid date, lets determine whether it's magic or not </em>

<em> </em>

<em>#Section 2 </em>

<em># Calculate the mutliplication of day and month </em>

<em>dayxMonth = day * month </em>

<em> </em>

<em># Display the results to the screen </em>

<em>print() </em>

<em>print("The date ", day, "/", month, "/", year, end=" ") </em>

<em />

<em />

<em># Calculates whether the entered date is a magic date </em>

<em>if dayxMonth == year: </em>

<em>    print ("is a magic date.") </em>

<em>else: </em>

<em>    print ("is not a magic date.") </em>

Explanation for Question 1:

#section 1

The Try and Except block in combination with the while loop is used to ensure that all inputs are accurate if there is an error in the input, it prompts the user to enter a valid input and states the problem with the input.

Each try block contains an if statement for day, month and year respectively.

<em />

#Section 2

calculates the multiplication of  day  and month,

compares it with the year to find out if it's magic and finally prints the result to the screen

Answer for Question 2:

Code for the second question:

<em>print("Time   Calories Burned in minutes") </em>

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

<em>for time in range(10,31,5): </em>

<em>    cburn=3.9*time </em>

<em>    print(time,cburn,sep='      ')</em>

<em />

Explanation for Question 2:

  • <em>for time in range(10,31,5): </em>

A for loop is used to iterate over a range of values.

from 10 to 31 and the skipper is 5.

The skipper is how many numbers are skipped before the for lop takes another value from the range.

  • <em>  </em><em>cburn=3.9*time </em>

<em>                print(time,cburn,sep='      ')</em>

the values provided by the range are 10, 15, 20, 25, and 30 minutes.

we then calculate the calories for each value and print then to the screen.

You might be interested in
What is the best example of how computers have changed the way people communicate?
azamat

Answer:

c since it is very important that people reached where ever they are

Hope This Helps!!!

4 0
2 years ago
We all interact with various information systems every day: at the grocery store, at work, at school, even in our cars (at least
Serhud [2]

Explanation:

An information system can be defined as an automated system or not, which is used for the purpose of collecting data and transforming it into relevant information for a given purpose.

Currently, information systems are increasingly used in the organizational environment, for example, as management information systems and decision support systems, which are automated computer systems that provide greater support to a manager's work, due to the amount of data that store and process relevant information to assist in the speed of the decision-making process, since information systems are able to capture a volume of data and analyze it, create standards, find flaws and transmit essential information that makes the manager's work more facilitated and improved.

8 0
3 years ago
The data _____ component of a database management system (DBMS) is used to create and maintain the data dictionary. manipulation
Ira Lisetskai [31]

Answer:

definition

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. This records are stored and communicated to other data when required or needed.

Basically, when a database management system (DBMS) receives data update requests from application programs, it simply instructs the operating system installed on a server to provide the requested data or informations.

Hence, the data definition component of a database management system (DBMS) is used to create and maintain the data dictionary.

6 0
3 years ago
The most important criteria of a good tracking method is that it is ______. a. Comfortable b. Computer compatible c. Portable d.
AnnyKZ [126]

Answer:

Comfortable

Explanation:

The most important criteria of a good tracing method is that it is comfortable. because, if you are not comfortable you cannot pay head to their work properly.You cannot made decision and you can also not to recognize your improvements during tracking.

8 0
4 years ago
Read 2 more answers
A slide in Blake's presentation contained the following information:
deff fn [24]

Answer:

consistent phrasing is missing

Explanation:

If you will note carefully, the bullets are not in correct format. The model is missing. The correct one is as below.

Risks

The correct form of presentation is as below:

1. Risks

a. employees  

              a. physical illness

              b. mental illness

              c. death  

2. Customers  

              a.   complaints

              b.   downtime

3.  Benefits

However, the content seems to be complete now, and hence not anything else is required. And since its not something very tough to decide to go with, bite the bullet is certainly not an issue.  

3 0
3 years ago
Other questions:
  • Random access memory is the portion of a computer's primary storage that does not lose its contents when one switches off the po
    6·2 answers
  • How many four-digit personal identification numbers (PIN) are possible if the PIN cannot begin or end with a 0 and the PIN must
    6·1 answer
  • What kind of music you guys play
    5·2 answers
  • True or false Encryption prevents hackers from hacking data?
    8·1 answer
  • ¿Cuál es la función que cumplía los sofistas y Porque eran tan importantes?​
    13·1 answer
  • What is the correct sequence in which a computer operates​
    6·1 answer
  • What ethical concerns might arise from applying new IT to law enforcement?
    5·1 answer
  • A mobile phone app asks the user to point the phone's camera at a room and then applies the phone's lidar scanning function. wha
    8·1 answer
  • True or false. A plug-in card is always required to support pc sound
    11·2 answers
  • What is the difference between concrete language and abstract language? give an example of each.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!