Scratch and Python syntax
Hey this nimai come with python scratch block to direct python code just read my article and give up your complexity with python coding One aspect of using a text-based language that many learners struggle with is understanding the specific syntax (the rules of the language) required. Mistakes made in a program are often due to these rules not being followed and are called syntax errors. It is therefore helpful to show the parallels and differences between a language that a learner has already mastered and the one they are trying to learn. Shown below are a few Scratch blocks and their equivalent code in Python. The list is far from exhaustive and is intended as a reference guide rather than an exercise to be worked through. Variable assignment In Scratch, a variable needs to be created before it can be assigned a value, whereas in Python a variable is created upon assignment with a value. In Python, it is necessary to surround strings (any text) with either single ( '...