SlideShare a Scribd company logo
Write a Python Code: Assuming that two objects f1 and f2 of type Fraction have been created
and assigned values, write statements to perform each task.
a) Double the value of f1.
b) Invert f2.
c) Make f1 equal to the (unsimplified) product of f1 and f2.
d) Make f2 equal to the (unsimplified) sum of f1 and f2.
e) Make f1 equal to f1 (the absolute value of f1).

More Related Content

More from Jonathan5GxRossk

You are looking under a microscope at a cell from an organism that has.docx
You are looking under a microscope at a cell from an organism that has.docxYou are looking under a microscope at a cell from an organism that has.docx
You are looking under a microscope at a cell from an organism that has.docx
Jonathan5GxRossk
 
Write an interactive C++ program that reads in 2 whole numbers- The pr.docx
Write an interactive C++ program that reads in 2 whole numbers- The pr.docxWrite an interactive C++ program that reads in 2 whole numbers- The pr.docx
Write an interactive C++ program that reads in 2 whole numbers- The pr.docx
Jonathan5GxRossk
 
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docxYears Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
Jonathan5GxRossk
 
x2-T2+e2.docx
x2-T2+e2.docxx2-T2+e2.docx
x2-T2+e2.docx
Jonathan5GxRossk
 
x1-x2 be the onder statistics of a randome sample from a distribartion.docx
x1-x2 be the onder statistics of a randome sample from a distribartion.docxx1-x2 be the onder statistics of a randome sample from a distribartion.docx
x1-x2 be the onder statistics of a randome sample from a distribartion.docx
Jonathan5GxRossk
 
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docxWrite brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
Jonathan5GxRossk
 
X - Y plot - different Y axes- An ecologist is interested in the effec.docx
X - Y plot - different Y axes- An ecologist is interested in the effec.docxX - Y plot - different Y axes- An ecologist is interested in the effec.docx
X - Y plot - different Y axes- An ecologist is interested in the effec.docx
Jonathan5GxRossk
 
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docxWruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
Jonathan5GxRossk
 
Write- compile- and test a program called StudentInfo that displays a.docx
Write- compile- and test a program called StudentInfo that displays a.docxWrite- compile- and test a program called StudentInfo that displays a.docx
Write- compile- and test a program called StudentInfo that displays a.docx
Jonathan5GxRossk
 
write the MIPS assembly code implementing the following C-C++ statemen.docx
write the MIPS assembly code implementing the following C-C++ statemen.docxwrite the MIPS assembly code implementing the following C-C++ statemen.docx
write the MIPS assembly code implementing the following C-C++ statemen.docx
Jonathan5GxRossk
 
Write the following mathematical expressions in Python- Assume- x- y-.docx
Write the following mathematical expressions in Python- Assume- x- y-.docxWrite the following mathematical expressions in Python- Assume- x- y-.docx
Write the following mathematical expressions in Python- Assume- x- y-.docx
Jonathan5GxRossk
 
Write python code which prompts the user to enter one of the following.docx
Write python code which prompts the user to enter one of the following.docxWrite python code which prompts the user to enter one of the following.docx
Write python code which prompts the user to enter one of the following.docx
Jonathan5GxRossk
 
Write the SQL commands from staffs table to display department name (d.docx
Write the SQL commands from staffs table to display department name (d.docxWrite the SQL commands from staffs table to display department name (d.docx
Write the SQL commands from staffs table to display department name (d.docx
Jonathan5GxRossk
 
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docxwrite program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
Jonathan5GxRossk
 
write for this Database Conceptual Design (ERD) - Populate Database P.docx
write for this  Database Conceptual Design (ERD) - Populate Database P.docxwrite for this  Database Conceptual Design (ERD) - Populate Database P.docx
write for this Database Conceptual Design (ERD) - Populate Database P.docx
Jonathan5GxRossk
 
Write a MIPS program using MARS platform that takes numbers from input.docx
Write a MIPS program using MARS platform that takes numbers from input.docxWrite a MIPS program using MARS platform that takes numbers from input.docx
Write a MIPS program using MARS platform that takes numbers from input.docx
Jonathan5GxRossk
 

More from Jonathan5GxRossk (16)

You are looking under a microscope at a cell from an organism that has.docx
You are looking under a microscope at a cell from an organism that has.docxYou are looking under a microscope at a cell from an organism that has.docx
You are looking under a microscope at a cell from an organism that has.docx
 
Write an interactive C++ program that reads in 2 whole numbers- The pr.docx
Write an interactive C++ program that reads in 2 whole numbers- The pr.docxWrite an interactive C++ program that reads in 2 whole numbers- The pr.docx
Write an interactive C++ program that reads in 2 whole numbers- The pr.docx
 
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docxYears Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
Years Financed 4-00- 4-25- 4-50- 4-75- 5-00- 5-25- 5-50- 5-75- 6-00- 6.docx
 
x2-T2+e2.docx
x2-T2+e2.docxx2-T2+e2.docx
x2-T2+e2.docx
 
x1-x2 be the onder statistics of a randome sample from a distribartion.docx
x1-x2 be the onder statistics of a randome sample from a distribartion.docxx1-x2 be the onder statistics of a randome sample from a distribartion.docx
x1-x2 be the onder statistics of a randome sample from a distribartion.docx
 
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docxWrite brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
Write brief notes on these- Fluids and Electrolytes-Acid-Base Balance.docx
 
X - Y plot - different Y axes- An ecologist is interested in the effec.docx
X - Y plot - different Y axes- An ecologist is interested in the effec.docxX - Y plot - different Y axes- An ecologist is interested in the effec.docx
X - Y plot - different Y axes- An ecologist is interested in the effec.docx
 
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docxWruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
Wruch of the lollowng z scores is bctow the mean- 0-4 001 12 ( ) Click.docx
 
Write- compile- and test a program called StudentInfo that displays a.docx
Write- compile- and test a program called StudentInfo that displays a.docxWrite- compile- and test a program called StudentInfo that displays a.docx
Write- compile- and test a program called StudentInfo that displays a.docx
 
write the MIPS assembly code implementing the following C-C++ statemen.docx
write the MIPS assembly code implementing the following C-C++ statemen.docxwrite the MIPS assembly code implementing the following C-C++ statemen.docx
write the MIPS assembly code implementing the following C-C++ statemen.docx
 
Write the following mathematical expressions in Python- Assume- x- y-.docx
Write the following mathematical expressions in Python- Assume- x- y-.docxWrite the following mathematical expressions in Python- Assume- x- y-.docx
Write the following mathematical expressions in Python- Assume- x- y-.docx
 
Write python code which prompts the user to enter one of the following.docx
Write python code which prompts the user to enter one of the following.docxWrite python code which prompts the user to enter one of the following.docx
Write python code which prompts the user to enter one of the following.docx
 
Write the SQL commands from staffs table to display department name (d.docx
Write the SQL commands from staffs table to display department name (d.docxWrite the SQL commands from staffs table to display department name (d.docx
Write the SQL commands from staffs table to display department name (d.docx
 
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docxwrite program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
write program using tinkercard - 2 LED connected to pin 7 and pin 8 -.docx
 
write for this Database Conceptual Design (ERD) - Populate Database P.docx
write for this  Database Conceptual Design (ERD) - Populate Database P.docxwrite for this  Database Conceptual Design (ERD) - Populate Database P.docx
write for this Database Conceptual Design (ERD) - Populate Database P.docx
 
Write a MIPS program using MARS platform that takes numbers from input.docx
Write a MIPS program using MARS platform that takes numbers from input.docxWrite a MIPS program using MARS platform that takes numbers from input.docx
Write a MIPS program using MARS platform that takes numbers from input.docx
 

Recently uploaded

Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 

Recently uploaded (20)

Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 

Write a Python Code- Assuming that two objects f1 and f2 of type Fract.docx

  • 1. Write a Python Code: Assuming that two objects f1 and f2 of type Fraction have been created and assigned values, write statements to perform each task. a) Double the value of f1. b) Invert f2. c) Make f1 equal to the (unsimplified) product of f1 and f2. d) Make f2 equal to the (unsimplified) sum of f1 and f2. e) Make f1 equal to f1 (the absolute value of f1).