Advanced Python (GCSE Level) - Using the Evaluate (Eval) Function

preview_player
Показать описание
Learn what the Eval function does and how to use it to automatically solve math problems in python

-Tags:
Computer programming
Python programming tutorial
Python programming course
Online computer programming courses
Programming for kids
Programming games for kids
Programming classes for kids
Рекомендации по теме
Комментарии
Автор

Nice to see a safe use of 'eval', might be a good idea to fully explain that is actually runs the input as python code (fine here) and so you must never let the user provide raw input for eval - just to make sure people don't get into bad habits and create security problems. I know this is just GCSE though.

gigawattproductions
Автор

How would I go about rounding off the acceptable answer to two decimals for example 8/7 = 1.14 instead of 1.1428571428571428??
I already changed int() to float().

generaltech