Skip to content

This repository features code examples from Dr. Chuck Severance's lecture, highlighting Python-C equivalences to help learners bridge the gap between the two languages.

Notifications You must be signed in to change notification settings

techgoddessx/The-Rosetta-Stone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

From Python to C - The Rosetta Stone Lecture

This repository is a collection of practical examples presented by Dr. Chuck Severance, illustrating the fundamental concepts and syntax equivalencies between Python and C. The examples provide a comprehensive introduction to the world of C programming while leveraging Python as a bridge for understanding.

Whether you're a newcomer to C programming or looking to solidify your Python skills, this repository offers a hands-on approach to comparing the two languages. Explore the code, experiment, and enhance your proficiency in both Python and C.

Check the full video here

Dr. Chuck's Python to C Lecture Notes

  • C is the mother tongue of advanced programming languages
  • Python is written in C and deeply influenced by C
Python C
White space is essential Whitespace ignored
Very object-oriented Not object-oriented at all
Convenient data structures (list, dict, etc.) Fast, efficient, powerful (struct, pointers, etc.)
Auto memory management Manual memory management
1980s 1970s

Similarities​ :

  • Arithmetic Operators: + - * / % ​

  • Comparison Operators: == != < > <= the same​

  • Variable naming rules – letter/underscore + numbers/letters/underscores – also case matters​

  • While loops – also break and continue in loops​

  • Constants similar except for strings and characters and booleans​

  • Both have int / float, and char / byte​

    • C has no str, list, or dict​

    • Python has no struct or double

Differences​

  • Boolean operators​

    • and / not / or versus && ! ||​
  • C for loops are indeterminant (i.e. no for ... in in C)​

  • C has no pre-defined True or False​

  • None and NULL are similar concepts but quite different​

  • Strings and character arrays are similar concepts but very different​

  • C has no list, or dict​

  • Python has no struct - float in Python is a C double

About

This repository features code examples from Dr. Chuck Severance's lecture, highlighting Python-C equivalences to help learners bridge the gap between the two languages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published