Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary star, measured as magnitude varies. It can be calculated through a complex mathematical model but we can approximate the brightness of a binary star as a cyclic function of time. For example, for the red giant star Mira and its companion, we use the approximation as follows: At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is then determined by the formula 7(t – 0.9)] 3.255 – In 1.352 + cos- 0.7 until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the formula 7(t – 4.4)] 3.598 – In 1.998 + cos- 0.4 until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of 6.4 days. Write a PYTHON program to read in the value of time /in days and print the magnitude of the red giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1). Your program prints out an error message when the time value is negative (figure 2). In (28]: runfile('/Users/hamzazidoum/Documents/2101/2101_F2021/PA2/ PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' ) PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS Enter time in days: 11 Magnitue of binary star at time 11.e days is 2.906 Bye!... In [29]: | Figure 1: Sample Input/Output when input data is valid
Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary star, measured as magnitude varies. It can be calculated through a complex mathematical model but we can approximate the brightness of a binary star as a cyclic function of time. For example, for the red giant star Mira and its companion, we use the approximation as follows: At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is then determined by the formula 7(t – 0.9)] 3.255 – In 1.352 + cos- 0.7 until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the formula 7(t – 4.4)] 3.598 – In 1.998 + cos- 0.4 until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of 6.4 days. Write a PYTHON program to read in the value of time /in days and print the magnitude of the red giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1). Your program prints out an error message when the time value is negative (figure 2). In (28]: runfile('/Users/hamzazidoum/Documents/2101/2101_F2021/PA2/ PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' ) PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS Enter time in days: 11 Magnitue of binary star at time 11.e days is 2.906 Bye!... In [29]: | Figure 1: Sample Input/Output when input data is valid
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Python, Please use Spyder
![Problem Definition
Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary
star, measured as magnitude varies. It can be calculated through a complex mathematical model but
we can approximate the brightness of a binary star as a cyclic function of time. For example, for the
red giant star Mira and its companion, we use the approximation as follows:
At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is
then determined by the formula
T(t – 0.9)]
0.7
3.255 – In 1.352 + cos·
until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the
formula
T(t – 4.4)]
3.598 – In 1.998 + cos-
0.4
until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of
6.4 days.
Write a PY'THON program to read in the value of time tin days and print the magnitude of the red
giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1).
Your program prints out an error message when the time value is negative (figure 2).
In (28): runfile('/Users/hamzazidoum/Documents/2101/2101_F2®21/PA2/
PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' )
PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS
Enter time in days: 11
Magnitue of binary star at time 11.e days is 2.906
Bye!...
In [29]: |
Figure 1: Sample Input/Output when input data is valid](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F63b2fbd2-4ffb-4355-be30-95278f02c4b5%2F265309cd-13db-4ee4-87a1-7516243cc618%2Fmhopak_processed.png&w=3840&q=75)
Transcribed Image Text:Problem Definition
Binary stars are two stars orbiting a common center of mass. The apparent brightness of a binary
star, measured as magnitude varies. It can be calculated through a complex mathematical model but
we can approximate the brightness of a binary star as a cyclic function of time. For example, for the
red giant star Mira and its companion, we use the approximation as follows:
At time t = 0 days, its magnitude is 2.5, and it stays at this level until t = 0.9 days. Its magnitude is
then determined by the formula
T(t – 0.9)]
0.7
3.255 – In 1.352 + cos·
until t = 2.3 days, its magnitude is then 2.5 until t = 4.4 days, and it is then determined by the
formula
T(t – 4.4)]
3.598 – In 1.998 + cos-
0.4
until t = 5.2. It then remains at 2.5 until t = 6.4 days, after which the cycle repeats with a period of
6.4 days.
Write a PY'THON program to read in the value of time tin days and print the magnitude of the red
giant star Mira A and its companion at that time. See run samples when input data is valid (figure 1).
Your program prints out an error message when the time value is negative (figure 2).
In (28): runfile('/Users/hamzazidoum/Documents/2101/2101_F2®21/PA2/
PA2_Hz. py', wdir='/Users/hamzazidoum/Documents/2101/2101_F2021/PA2' )
PROGRAM TO COMPUTE THE BRIGHTNESS OF TWIN STARS
Enter time in days: 11
Magnitue of binary star at time 11.e days is 2.906
Bye!...
In [29]: |
Figure 1: Sample Input/Output when input data is valid
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY