Skip to content
Felix
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
  • Ask An Instructor
  • Support
  • Log in
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
Felix
  • Data
    • Company Analytics
    • My Filing Annotations
    • Market & Industry Data
    • United States
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
    • Europe
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
  • Models
  • Account
    • Edit my profile
    • My List
    • Restart Homepage Tour
    • Restart Company Analytics Tour
    • Restart Filings Tour
  • Log in
  • Ask An Instructor
    • Email Our Experts
    • Felix User Guide
    • Contact Support

Intro to Python

Learn the basics of coding in Python. Starting with calculations, text, dynamic outputs, and variables in code.

Unlock Your Certificate   
 
0% Complete

13 Lessons (36m)

Show lesson playlist
  • Description & Objectives

  • 1. Introduction to Python Learning Objectives

    00:23
  • 2. Python Fundamentals Introduction

    01:08
  • 3. Downloading Anaconda

    02:02
  • 4. Introducing Jupyter Notebook

    02:42
  • 5. Calculations

    00:57
  • 6. Calculations Workout

    01:43
  • 7. Mathematical Operators

    01:26
  • 8. Text Outputs

    03:21
  • 9. Dynamic Outputs

    02:22
  • 10. Text Workout

    03:34
  • 11. Variables

    05:01
  • 12. Variables Workout

    11:36
  • 13. Introduction to Python Review

    00:26

Next: Python Objects

Variables Workout

  • Notes
  • Questions
  • Transcript
  • 11:36

Practise using variables in Python.

Downloads

Intro to Python Jupyter Notebook Full

Glossary

Coding dynamic inputs Jupyter Notebook Python Variables
Back to top
Financial Edge Training

© Financial Edge Training 2025

Topics
Introduction to Finance Accounting Financial Modeling Valuation M&A and Divestitures Private Equity
Venture Capital Project Finance Credit Analysis Transaction Banking Restructuring Capital Markets
Asset Management Risk Management Economics Data Science and System
Request New Content
System Account User Guide Privacy Policy Terms & Conditions Log in
Transcript

In this exercise, you're going to incorporate everything that you've learned up until this point and put it into one piece of practice. So I encourage you, this is going to be a little bit more challenging than the exercises you've done previously in this lesson, which were pretty easy. And if you run into an issue, I encourage you to go back and review the corresponding part of this module and try and solve the problem yourself before looking at the solution. If you really get stuck, it's totally fine. Go ahead and look at the solution to get you over whatever kind of issue that you're having. But I encourage you first, give it a shot yourself and then if you run into a problem, try reviewing and figuring out the problem because that's going to help you retain this knowledge even more so that you can bring it up and use it when you need to on the job.

In your Jupyter Notebook file, you're going to find some data that I've already provided for you. And this corresponds to data for Apple and for Microsoft, and specifically their market cap preferred debt, their long-term debt, current long-term debt, minority interest, cash equivalents, and EBITDA for the last four quarters.

Your instructions for this exercise are first, calculate enterprise value and LTM EBITDA for both Apple and Microsoft and save as new variables. Second, calculate the enterprise value divided by LTM EBITDA, the enterprise value to EBITDA ratio for both Apple and Microsoft and save those as new variables. The formula that you need are right below for enterprise value and LTM EBITDA. After that, you're going to create a new variable that compares apple's ratio to Microsoft Ratio using the greater than operator. And just like Excel, the value that you get as an output will be either true or false. You're going to use the format function to then generate the following outputs that show Apple's enterprise value, Apple's LTM EBITDA, their enterprise value to EBITDA ratio.

You're gonna show the same three variables for Microsoft. And then finally you're going to create a line that has text and then uses the format function to say Apple's ratio is greater than Microsoft's false. And that false is going to be the variable that you create comparing apple's ratio to Microsoft ratio. This could be a little bit confusing first time, so I'm going to reiterate one more time. You're going to create a new variable and the value of that variable is going to be on one side, Apple's enterprise value to EBITDA ratio. On the other side, you're going to have Microsoft's enterprise value to EBITDA ratio and they're going to be separated by the greater than sign. And now that variable is what you're going to plug in to the format function and it's going to flow through and tell you Apple's ratio is greater than Microsoft's false. That false value is the value of your variable That then flows through the format function function.

Our first step is going to be to execute this code cell. So right here, there's a bunch of data provided for you already. In order for Jupyter Notebook to absorb that data and be able to use it, you first have to execute the co code cell by holding shift and pressing enter.

Now in this code sell below, I'm going to calculate the enterprise value and EBITDA of Apple and Microsoft using the formula provided in the exercise Just for the sake of time, I'm gonna copy this I and pasted it a few times and now I'm just gonna go back in and adjust the number of the quarter and the year.

And the formula for the enterprise value and EBITDA is going to be exactly the same for Microsoft, is just that all of the variables for Microsoft using M instead of an A. So I can copy these two lines of code, paste them down here again, and then replace the A with an M.

Alright? And now that code is ready to execute. So I've defined variables for apple's, enterprise value, Apple's EBITDA, Microsoft's enterprise value, and Microsoft's EBITDA.

The second step is to calculate the enterprise value to EBITDA ratio for both Apple and Microsoft. And that's gonna be a lot easier than typing in all of that stuff that we just did.

All we have to do is create two more variables in this next cell.

And we're dividing the two variables that we already created.

And again, I'm just gonna replace that A with an M for Microsoft.

Now our multiple variables are ready to define. I'm gonna execute that code block.

Moving on to the next step, we're going to create a new variable that compares Apple's enterprise value to EBITDA ratio to Microsoft's ratio using the greater than operator. And just like Excel, this value will be either true or false.

In this next cell, I'm gonna create a variable called compare. And I'm gonna make it equal to the value of that variable is equal to Apple's enterprise value to EBITDA ratio, and I'm going to use greater than Microsoft's enterprise value to EBITDA ratio. So what this gonna do is it's gonna compare the value in these two variables and it's gonna store the result of that comparison inside this new variable called compare. So we know that Apple is going to be either greater than or less than. So that true or false, which is the result of that comparison, saying that Apple is greater than Microsoft's ratio, that true or false is gonna be stored in our compare variable.

Now all we need to do is create an output to match this output in our exercise.

And when we do that, we're gonna use the format function to insert all of the values dynamically.

And here I'm just using the round function to limit the number of decimal places to two. If you didn't do that, totally fine. I'm just doing that to clean up the formatting a little bit in our output. However, the round function is a nice tool to have in your toolbox so that you can control the number of decimal places in your output. Now I'm gonna print a space and then I'm gonna copy that code and do the same thing for Microsoft.

So now I'm gonna print one more space and then the final comparison between Apple and Microsoft.

And note that here we had to escape those apostrophes with a backslash so that Python doesn't interpret that as an end to our block of text. Since we have the backslash, Python knows to interpret those apostrophes as a literal apostrophe within the block of text and to continue that block of text until it sees an apostrophe without the backslash in front of it. Now our code is ready to execute time to see if it matches the solution and the exercise.

Alright? And our output is exactly the same as what we were supposed to get from the exercise.

Content Requests and Questions

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account
Help

You need an account to contact support.

Create a free account or log in to an existing one

Sorry, you don't have access to that yet!

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account

You have reached the limit of annotations (10) under our premium subscription. Upgrade to unlock unlimited annotations.

Find out more about our premium plan

You are trying to access content that requires a free account. Sign up or login in seconds!

Create a free account or log in to an existing one

You are trying to access content that requires a premium plan.

Find out more about our premium plan or log in to your account

Only US listed companies are available under our Free and Boost plans. Upgrade to Pro to access over 7,000 global companies across the US, UK, Canada, France, Italy, Germany, Hong Kong and more.

Find out more about our premium plan or log in to your account

A pro account is required for the Excel Add In

Find out more about our premium plan

Congratulations on completing

This field is hidden when viewing the form
Name(Required)
This field is hidden when viewing the form
Rate this course out of 5, where 5 is excellent and 1 is terrible.
Were the stated learning objectives met?(Required)
Were the stated prerequisite requirements appropriate and sufficient?(Required)
Were the program materials, including the qualified assessment, relevant and did they contribute to the achievement of the learning objectives?(Required)
Was the time allotted to the learning activity appropriate?(Required)
Are you happy for us to use your feedback and details in future marketing?(Required)

Thank you for already submitting feedback for this course.

CPE

What is CPE?

CPE stands for Continuing Professional Education, by completing learning activities you earn CPE credits to retain your professional credentials. CPE is required for Certified Public Accountants (CPAs). Financial Edge Training is registered with the National Association of State Boards of Accountancy (NASBA) as a sponsor of continuing professional education on the National Registry of CPE Sponsors.

What are CPE credits?

For self study programs, 1 CPE credit is awarded for every 50 minutes of elearning content, this includes videos, workouts, tryouts, and exams.

CPE Exams

You must complete the CPE exam within 1 year of accessing a related playlist or course to earn CPE credits. To see how long you have left to complete a CPE exam, hover over the locked CPE credits button.

What if I'm not collecting CPE credits?

CPE exams do not count towards your FE certification. You do not need to complete the CPE exam if you are not collecting CPE credits, but you might find it useful for your own revision.


Further Help
  • Felix How to Guide walks you through the key functions and tools of the learning platform.
  • Playlists & Tryouts: Playlists are a collection of videos that teach you a specific skill and are tested with a tryout at the end. A tryout is a quiz that tests your knowledge and understanding of what you have just learned.
  • Exam: If you are collecting CPE points you must pass the relevant CPE exam within 1 year to receive credits.
  • Glossary: A glossary can be found below each video and provides definitions and explanations for terms and concepts. They are organized alphabetically to make it easy for you to find the term you need.
  • Search function: Use the Felix search function on the homepage to find content related to what you want to learn. Find related video content, lessons, and questions people have asked on the topic.
  • Closed Captions & Transcript: Closed captions and transcripts are available on videos. The video transcript can be found next to the closed captions in the video player. The transcript feature allows you to read the transcript of the video and search for key terms within the transcript.
  • Questions: If you have questions about the course content, you will find a section called Ask a Question underneath each video where you can submit questions to our expert instructor team.