Question: Type 6 + 4 * 9 at the Python prompt and hit enter. Record what happens.Now create a python script with the following contents: 6

Type 6+4*9 at the Python prompt and hit enter. Record what happens.Now create a python script with the following contents: 6+4*9What happens when you run this script? Now change the script contents to:Print (6+4*9)and run it again.What happened this time?Whenever an expression is typed at the Python prompt, it is evaluated and the result isautomatically shown on the line below. (Like on your calculator, if you type this expressionyoull get the result 42.) A script is different, however. Evaluations of expressions are not automatically displayed, so it isnecessary to use the print function to make the answer show up.It is hardly ever necessary to use the print function in immediate mode / at the commandprompt.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!