Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
The program below asks for an age. How do you give the answer (a) in a code box on this site, and (b) in a terminal on your own computer?
On this site, answers go in the Input box before Run. In a terminal, the program waits for you.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, compare your working with the solution.
input() and waits. Type the age and press Enter. The program continues.The program is the same in both places. Only the way of giving the answer is different.
Log in to join the discussion.
Loading…