Created
June 6, 2020 02:55
-
-
Save jmangrad/0d3640bba8b223f07a1b92ed5baed4fd to your computer and use it in GitHub Desktop.
Python Crash Course
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.