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]
2 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]2 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
________is a Windows software program with powerful accessibility solution that reads information on your screen using synthesiz
inn [45]

Answer:

The correct answer to the following question will be "JAWS".

Explanation:

  • JAWS is a strong accessibility tool, which uses synthesized speech to look for information on your monitor and provides several helpful commands to make it much easier using applications, edit documentation and read pages of the web.
  • It's a Microsoft Windows screen reader tool that helps visually and blind impaired people to decode the screen either via a message-to-speech interpretation or with a castable sign language display.
  • JAWS is manufactured by Freedom Scientific Blind and Group of Low Vision.

Therefore, JAWS is the right answer.

4 0
3 years ago
Which one of the following features can control left and right indents on using markers
QveST [7]
The Feature that can control left and right indents on using markers is Ruler.  The indent marker consists of two triangles and a rectangle.  <span>To change the left indent, click on the very bottom of the indent marker, the rectangle, and drag it to a new position.</span>  <span>The Right Indent is indicated by a single triangle on the Ruler at the current right margin. Click and drag it to change the margin.</span>
3 0
3 years ago
A proper divisor of a positive integer $n$ is a positive integer $d &lt; n$ such that $d$ divides $n$ evenly, or alternatively i
juin [17]

Answer:

The program written in Python is as follows:

<em>See Explanation section for line by line explanation</em>

for n in range(100,1000):

     isum = 0

     for d in range(1,n):

           if n%d == 0:

                 isum += d

     if isum == n * 2:

           print(n)

Explanation:

The program only considers 3 digit numbers. hence the range of n is from 100 to 999

for n in range(100,1000):

This line initializes sum to 0

     isum = 0

This line is an iteration that stands as the divisor

     for d in range(1,n):

This line checks if a number, d can evenly divide n

           if n%d == 0:

If yes, the sum is updated

                 isum += d

This line checks if the current number n is a double-perfect number

     if isum == n * 2:

If yes, n is printed

           print(n)

<em>When the program is run, the displayed output is 120 and 672</em>

4 0
3 years ago
What is ABC computer?​
mezya [45]

Answer: The Atanasoff–Berry computer was the first automatic electronic digital computer. Limited by the technology of the day, and execution, the device has remained somewhat obscure. The ABC's priority is debated among historians of computer technology, because it was neither programmable, nor Turing-complete.

Explanation:

5 0
2 years ago
HELP!!!
aleksley [76]

Answer:

The detail answer of this question is given in explanation section.

The simple answer is option B

Explanation:

Let took at each option:

A) an html tag

An html tag is used to start and end html document. It does not have anything to do with rendering.

B) a doctype declaration

The document type declaration is necessary because it tell the browser which version of html should be rendered.

C)Body tag tell the browser. it is the visible area of website.

D) A hear tag is used to clear meta data about website.

3 0
2 years ago
Read 2 more answers
Other questions:
  • What are the two different frequencies WiFi operates on?
    9·2 answers
  • ____ is a practice where a user in enticed by possible rewards and then asked to provide personal information.
    14·1 answer
  • Why is it important to develop a research plan?
    5·1 answer
  • The third wave of computing was characterized by the introduction of _____.
    10·1 answer
  • How designers have created products from waste materials?
    7·1 answer
  • ________type of website is an interactive website kept constantly updated and relevant to the needs of its customers using a dat
    5·1 answer
  • Mingji is working to transfer photos from her digital camera to her computer. While
    11·1 answer
  • Question #3
    15·2 answers
  • Which unit of binary storage has a size that is processor dependent?.
    15·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!