SlideShare a Scribd company logo
1 of 15
MOJO PROGRAMMING
LANGUAGE
NAME: HarisankarTS
REG NO : ZTAVMVS009
What is Mojo?
● A new programming language for AI developers
● Mojo is a programming language that combines the ease of use and flexibility of dynamic
languages, such as Python.
● It has performance and control of systems languages, like C++ and Rust.
● .Mojo is a programming language developed by Modular Inc.
● It was made accessible by browser in May, 2023 and locally on Linux in September, 2023.
Key Features?
● Python-like syntax and dynamic typing: Mojo has a syntax that is similar to Python, making it easy for Python developers to learn.
Mojo also supports dynamic typing, which means that you do not need to declare the type of each variable before you use it.
● Systems programming features: Mojo also includes a number of systems programming features, such as manual memory
management and support for multiple threads. This makes Mojo suitable for writing high-performance and resource-efficient code.
● Metaprogramming.
● Portability.
● High performance.
● Interoperability with Python: Mojo can import and use any Python library, giving developers access to a vast ecosystem of tools and
resources. This makes Mojo a good choice for developers who want to use the latest AI and machine learning techniques without
having to learn a new programming language from scratch.
● Mojo is a promising new programming language with the potential to revolutionize the way AI and machine learning software is
developed.
● Mojo is still under development, but it is already being used by a number of companies and researchers to build cutting-edge AI and
machine learning applications.
Syntax Example
This is simple: Mojo supports all of Python’s syntax and semantics. If
you’re not familiar with Python syntax.
For example, like Python, Mojo uses line breaks and indentation to define
code blocks (not curly braces), and Mojo supports all of Python’s control-
flow syntax such as if conditions and for loops.
fn main():
print("Hello, world!")
Main()
This program is very similar to the "Hello, world!" program in Python. The
fn main() statement defines a function called main(), which is the entry
point for the program. The print("Hello, world!") statement prints the
message "Hello, world!" to the console.
Syntax Example
Run a Mojo file
First, write the Mojo code and execute it:
Create a file named hello.mojo (or hello.🔥) and add the following code:
fn main():
print("Hello, world!")
That’s all you need. Save the file and return to your terminal.
Now run it with the mojo command:
mojo hello.mojo
It should immediately print the message:
Syntax Example
In the example, we will create a Mojo function
that will add two arguments.
To run the Mojo function:
You must specify a type to arguments of the
function.
You must declare the return type with an
arrow.
fn add(x: Int, y: Int) -> Int:
return x + y
z = add(3, 5)
print(z)
Language basics
First and foremost, Mojo is a compiled language and a lot of its performance and
memory-safety features are derived from that fact. Mojo code can be ahead-of-time
(AOT) or just-in-time (JIT) compiled.
Like other compiled languages, Mojo programs (.mojo or .🔥 files) require a main()
function as the entry point to the program. For example:
fn main():
var x: Int = 1
x += 1
print(x)
If you know Python, you might have expected the function name to be def main()
instead of fn main(). Both actually work in Mojo, but using fn behaves a bit differently.
Data Types
Mojo is a statically typed programming language, which means that you must declare
the type of each variable before you can use it. This helps to prevent errors and
makes your code more reliable.
Mojo has a number of built-in data types, including:
Int: Integer numbers.
Float: Floating-point numbers.
Bool: Boolean values (true or false).
String: Text strings.
Char: Single characters.
Void: The absence of a value.
Functions
● Mojo functions are similar to functions in other programming languages. They allow
you to group together related code and reuse it throughout your program.
● To define a function in Mojo, you use the fn keyword followed by the name of the
function and a list of parameters. The body of the function is defined between curly
braces.
● Both fn and def functions have their value.
● fn functions enforce strongly-typed and memory-safe behaviors in your code
● .
Conclusion
● .
● Mojo is a new and exciting programming language with the potential to become a powerful
tool for AI development and other high-performance computing tasks. While it is still under
development, it is already being used by a number of companies and researchers to build
cutting-edge applications.
● If you are looking for a programming language that can help you write fast, efficient, and
portable code, then Mojo is worth considering..
● It was made accessible by browser in May, 2023 and locally on Linux in September, 2023.
Future of MOJO
● .
● The future of Mojo programming is very promising. The language is still under development, but it has already
attracted a lot of attention from the AI and machine learning communities.
● One of the main advantages of Mojo is its ability to generate highly optimized code. This makes it ideal for
applications where performance is critical, such as AI training and inference, machine learning, and scientific
computing.
● Another advantage of Mojo is its interoperability with Python. This means that developers can use Mojo to access
the vast ecosystem of Python libraries and tools. This makes Mojo a good choice for developers who want to use the
latest AI and machine learning techniques without having to learn a new programming language from scratch.
● Mojo is also designed to be extensible, which means that it is easy to add new features and support new hardware
platforms. This makes Mojo a good choice for developing cutting-edge applications.
● Overall, the future of Mojo programming looks very bright. The language has the potential to revolutionize the way
AI and machine learning software is developed..
THANKYOU

More Related Content

What's hot

Facial Emotion Recognition using Convolution Neural Network
Facial Emotion Recognition using Convolution Neural NetworkFacial Emotion Recognition using Convolution Neural Network
Facial Emotion Recognition using Convolution Neural Network
YogeshIJTSRD
 
Face recognition technology - BEST PPT
Face recognition technology - BEST PPTFace recognition technology - BEST PPT
Face recognition technology - BEST PPT
Siddharth Modi
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
Santosh Kumar
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
ijtsrd
 

What's hot (20)

Face recognisation system
Face recognisation systemFace recognisation system
Face recognisation system
 
Facial Emotion Recognition using Convolution Neural Network
Facial Emotion Recognition using Convolution Neural NetworkFacial Emotion Recognition using Convolution Neural Network
Facial Emotion Recognition using Convolution Neural Network
 
HUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEMHUMAN EMOTION RECOGNIITION SYSTEM
HUMAN EMOTION RECOGNIITION SYSTEM
 
Neural networks and deep learning
Neural networks and deep learningNeural networks and deep learning
Neural networks and deep learning
 
Google loon ppt
Google loon pptGoogle loon ppt
Google loon ppt
 
Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
 
Introduction to Machine Learning
Introduction to Machine Learning   Introduction to Machine Learning
Introduction to Machine Learning
 
eye phone technology
eye phone technologyeye phone technology
eye phone technology
 
Laptop Price Prediction system
Laptop Price Prediction systemLaptop Price Prediction system
Laptop Price Prediction system
 
Virtual keyboard abstract
Virtual keyboard abstractVirtual keyboard abstract
Virtual keyboard abstract
 
Face recognition technology - BEST PPT
Face recognition technology - BEST PPTFace recognition technology - BEST PPT
Face recognition technology - BEST PPT
 
Face Mask Detection PPT.pptx
Face Mask Detection PPT.pptxFace Mask Detection PPT.pptx
Face Mask Detection PPT.pptx
 
Smart Mirror using Raspberry PI
Smart Mirror using Raspberry PISmart Mirror using Raspberry PI
Smart Mirror using Raspberry PI
 
Biological computers
Biological computers Biological computers
Biological computers
 
Computer vision - images and image filtering
Computer vision - images and image filtering Computer vision - images and image filtering
Computer vision - images and image filtering
 
Application of Cartoon Like Effects to Actual Images
Application of Cartoon Like Effects to Actual ImagesApplication of Cartoon Like Effects to Actual Images
Application of Cartoon Like Effects to Actual Images
 
Face recognition ppt
Face recognition pptFace recognition ppt
Face recognition ppt
 
Computer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and PythonComputer Vision - Real Time Face Recognition using Open CV and Python
Computer Vision - Real Time Face Recognition using Open CV and Python
 
Facial Emoji Recognition
Facial Emoji RecognitionFacial Emoji Recognition
Facial Emoji Recognition
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 

Similar to MOJOsppt.pptx

Python Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docxPython Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docx
Manohar k
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
Aditya Patel
 
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptxa9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
cigogag569
 

Similar to MOJOsppt.pptx (20)

Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
17th
17th17th
17th
 
IRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming Language
 
Python Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docxPython Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docx
 
"Introduction of Mojo programming language"
"Introduction of Mojo programming language""Introduction of Mojo programming language"
"Introduction of Mojo programming language"
 
Why Python in required in Civil Engineering
Why Python in required in Civil EngineeringWhy Python in required in Civil Engineering
Why Python in required in Civil Engineering
 
Which is better, Java or Python? And how?
Which is better, Java or Python? And how?Which is better, Java or Python? And how?
Which is better, Java or Python? And how?
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdf
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdf
 
python-handbook.pdf
python-handbook.pdfpython-handbook.pdf
python-handbook.pdf
 
PYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptxPYTHON TUTORIALS.pptx
PYTHON TUTORIALS.pptx
 
A complete guide to Python app development.pdf
A complete guide to Python app development.pdfA complete guide to Python app development.pdf
A complete guide to Python app development.pdf
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Learning to code in 2020
Learning to code in 2020Learning to code in 2020
Learning to code in 2020
 
What makes python 3.11 special
What makes python 3.11 special What makes python 3.11 special
What makes python 3.11 special
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python for students step by step guidance
Python for students step by step guidancePython for students step by step guidance
Python for students step by step guidance
 
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptxa9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
a9855c3532e13484ee6a39ba30218896d7c0d863-1676987272842.pptx
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

MOJOsppt.pptx

  • 2. What is Mojo? ● A new programming language for AI developers ● Mojo is a programming language that combines the ease of use and flexibility of dynamic languages, such as Python. ● It has performance and control of systems languages, like C++ and Rust. ● .Mojo is a programming language developed by Modular Inc. ● It was made accessible by browser in May, 2023 and locally on Linux in September, 2023.
  • 3. Key Features? ● Python-like syntax and dynamic typing: Mojo has a syntax that is similar to Python, making it easy for Python developers to learn. Mojo also supports dynamic typing, which means that you do not need to declare the type of each variable before you use it. ● Systems programming features: Mojo also includes a number of systems programming features, such as manual memory management and support for multiple threads. This makes Mojo suitable for writing high-performance and resource-efficient code. ● Metaprogramming. ● Portability. ● High performance. ● Interoperability with Python: Mojo can import and use any Python library, giving developers access to a vast ecosystem of tools and resources. This makes Mojo a good choice for developers who want to use the latest AI and machine learning techniques without having to learn a new programming language from scratch. ● Mojo is a promising new programming language with the potential to revolutionize the way AI and machine learning software is developed. ● Mojo is still under development, but it is already being used by a number of companies and researchers to build cutting-edge AI and machine learning applications.
  • 4. Syntax Example This is simple: Mojo supports all of Python’s syntax and semantics. If you’re not familiar with Python syntax. For example, like Python, Mojo uses line breaks and indentation to define code blocks (not curly braces), and Mojo supports all of Python’s control- flow syntax such as if conditions and for loops. fn main(): print("Hello, world!") Main() This program is very similar to the "Hello, world!" program in Python. The fn main() statement defines a function called main(), which is the entry point for the program. The print("Hello, world!") statement prints the message "Hello, world!" to the console.
  • 5. Syntax Example Run a Mojo file First, write the Mojo code and execute it: Create a file named hello.mojo (or hello.🔥) and add the following code: fn main(): print("Hello, world!") That’s all you need. Save the file and return to your terminal. Now run it with the mojo command: mojo hello.mojo It should immediately print the message:
  • 6. Syntax Example In the example, we will create a Mojo function that will add two arguments. To run the Mojo function: You must specify a type to arguments of the function. You must declare the return type with an arrow. fn add(x: Int, y: Int) -> Int: return x + y z = add(3, 5) print(z)
  • 7. Language basics First and foremost, Mojo is a compiled language and a lot of its performance and memory-safety features are derived from that fact. Mojo code can be ahead-of-time (AOT) or just-in-time (JIT) compiled. Like other compiled languages, Mojo programs (.mojo or .🔥 files) require a main() function as the entry point to the program. For example: fn main(): var x: Int = 1 x += 1 print(x) If you know Python, you might have expected the function name to be def main() instead of fn main(). Both actually work in Mojo, but using fn behaves a bit differently.
  • 8. Data Types Mojo is a statically typed programming language, which means that you must declare the type of each variable before you can use it. This helps to prevent errors and makes your code more reliable. Mojo has a number of built-in data types, including: Int: Integer numbers. Float: Floating-point numbers. Bool: Boolean values (true or false). String: Text strings. Char: Single characters. Void: The absence of a value.
  • 9. Functions ● Mojo functions are similar to functions in other programming languages. They allow you to group together related code and reuse it throughout your program. ● To define a function in Mojo, you use the fn keyword followed by the name of the function and a list of parameters. The body of the function is defined between curly braces. ● Both fn and def functions have their value. ● fn functions enforce strongly-typed and memory-safe behaviors in your code ● .
  • 10.
  • 11.
  • 12.
  • 13. Conclusion ● . ● Mojo is a new and exciting programming language with the potential to become a powerful tool for AI development and other high-performance computing tasks. While it is still under development, it is already being used by a number of companies and researchers to build cutting-edge applications. ● If you are looking for a programming language that can help you write fast, efficient, and portable code, then Mojo is worth considering.. ● It was made accessible by browser in May, 2023 and locally on Linux in September, 2023.
  • 14. Future of MOJO ● . ● The future of Mojo programming is very promising. The language is still under development, but it has already attracted a lot of attention from the AI and machine learning communities. ● One of the main advantages of Mojo is its ability to generate highly optimized code. This makes it ideal for applications where performance is critical, such as AI training and inference, machine learning, and scientific computing. ● Another advantage of Mojo is its interoperability with Python. This means that developers can use Mojo to access the vast ecosystem of Python libraries and tools. This makes Mojo a good choice for developers who want to use the latest AI and machine learning techniques without having to learn a new programming language from scratch. ● Mojo is also designed to be extensible, which means that it is easy to add new features and support new hardware platforms. This makes Mojo a good choice for developing cutting-edge applications. ● Overall, the future of Mojo programming looks very bright. The language has the potential to revolutionize the way AI and machine learning software is developed..