calthoff / self_taught

This repository contains the exercises for "The Self-Taught Programmer: The Definitive Guide to Programming Professionally."
http://theselftaughtprogrammer.io
267 stars 226 forks source link

No output #11

Closed ghost closed 6 years ago

ghost commented 7 years ago

Attempting to do the python_ex8.py

in the beginning of the book. It is the example of a "good comment" where the command is supposed to give the diagonal of a rectangle. I have tried typing it, copying it, and saving it and running the module but no matter what I do the command gives me no output. It just produces "RESTART: C:/Users/Censoredfoldername/AppData/Local/Programs/Python/Python36-32/b" and then a new line of >>>

I am getting the same issue with python_ex27.py

I do

  1. b = 100
  2. b

and after running the module I receive no output. If I then enter B alone I will be given the value of 100. So the module gives the information but for some reason the value of b in the module does not prompt it to produce 100. I have to ask for B separate from the module.

calthoff commented 7 years ago

In the first example, there is not supposed to be any output. You need to run the second example from the shell.