Started Exercises in lp3thw

This commit is contained in:
Ganome 2021-04-19 16:00:08 +00:00
parent a00896b2ec
commit 4e87bc4686
5 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,8 @@
print("Hello World!")
print("Hello Again")
print("I like typing this.")
print("This is fun.")
print("Yay! Printing.")
print("I'd much rather you 'not'.")
print("I \"said\" do not touch this.")
#print("This line won't print")

View File

@ -0,0 +1,6 @@
#The pound symbol starts a comment, anything after is is disregarded!
print("I could have code like this.") # And comments after
#print("This code won't run")\
print("This code will run")

View File

@ -0,0 +1,16 @@
print("I will count my chickens:")
print("Hens", 25 + 30 / 6) #should print 30
print("Roosters", 100 - 25 * 3 % 4) #maybe 98?
print("Now I will count the eggs:")
print(3 + 2 + 1 -5 + 4 % 2 - 1 / 4 + 6)
print("Is it true that 3 + 2 < 5 - 7?")
print(3 + 2 < 5 - 7) #should print a boolean Ie. True/False
print("What is 3 + 2?", 3 + 2)
print("What is 5 - 7?", 5 - 7)
print("Oh, that's why it's False.")

View File

View File

@ -1 +1,3 @@
This is "Learn Python 3 The Hard Way" This is "Learn Python 3 The Hard Way"
http://www.informit.com/hardway