Skip to content

Instantly share code, notes, and snippets.

@jmangrad
Created June 6, 2020 02:55
Show Gist options
  • Save jmangrad/0d3640bba8b223f07a1b92ed5baed4fd to your computer and use it in GitHub Desktop.
Save jmangrad/0d3640bba8b223f07a1b92ed5baed4fd to your computer and use it in GitHub Desktop.
Python Crash Course
7-7. Infinity: Write a loop that never ends, and run it. (To end the loop, press
ctrl-C or close the window displaying the output.)
7.7 Answer
while True:
age = input("How old are you? ")
age = int(age)
if age < 3:
print("Your ticket is free")
elif age < 12:
print("Your ticket is $10")
else:
print("Your ticket is $15")
@Coldres75
Copy link

It looks very interesting, I myself have just recently started diving into the world of python programming and am thinking of starting with this course. Before that I was mostly into math, I used to take the problems on https://plainmath.net/12843/crate-fruit-specific-capacity-slides-inclined-degrees-below-horizontal and if I had trouble I used the solution, or to check the answer. Now I'm moving to a new area for myself and as a beginner looking for how to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment