Skip to content
Snippets Groups Projects
Commit 0714bbca authored by Daniel Moix's avatar Daniel Moix
Browse files

Resetting for new term

parent f57072e7
No related branches found
No related tags found
No related merge requests found
Showing
with 67 additions and 75 deletions
print("Hello Lecture 3!")
name = "Moix"
longer = "This is a longer string of text"
#0123456789012345678901234567890
print(name)
print(len(name))
print(len("A literal string"))
print(name[1:3])
print(longer[ 1 : 10 : 2 ])
print(len(longer[ 1 : 10 : 2 ]))
print(3 + 2)
print("three" + "two")
print(str(1) + "three")
digits = 98.6
print(float(int(float("99789.87"))))
print(int(digits))
print(digits)
print(float("3e8"))
print(ord('🐉'))
print(chr(128009 + 1))
print("She called him \"interesting\" the other day")
print('She called him "interesting" the other day')
print("Isn't is a \"contraction\"")
print("A\nB")
price = 5
item = "coffee"
print(item + ":\t" + str(price))
print("coffee:\t%.2f" % price)
print(f"{item}:\t{price:.2f}")
names = ["you", "Carol", "Bob"]
names[0] = "anthony"
print(names.index("Bob"))
print([f"{i} squared is {i**2}" for i in range(1, 10)])
set1 = {"A", "B", "C"}
set2 = {"C", "A", "B", 7}
print(set1)
print(set2)
print(set1 == set2)
print(7 in set1)
print(7 in set2)
\ No newline at end of file
print("Hello CS 171")
lecture = 5
while lecture <= 10:
# print(f"Hello Lecture {lecture}!")
lecture = lecture - 1
print("I am done. Finished at lecture", lecture)
#
# if lecture <= 10:
# print(f"Hello Lecture {lecture}!")
# lecture = lecture + 1
\ No newline at end of file
print("Hello CS 171")
File moved
print("Hello CS 171")
print("Hello CS 171")
print("Hello CS 171")
File moved
File moved
File moved
File moved
File moved
File moved
File moved
print("Hello Lecture 3!")
name = "Moix"
longer = "This is a longer string of text"
#0123456789012345678901234567890
print(name)
print(len(name))
print(len("A literal string"))
print(name[1:3])
print(longer[ 1 : 10 : 2 ])
print(len(longer[ 1 : 10 : 2 ]))
print(3 + 2)
print("three" + "two")
print(str(1) + "three")
digits = 98.6
print(float(int(float("99789.87"))))
print(int(digits))
print(digits)
print(float("3e8"))
print(ord('🐉'))
print(chr(128009 + 1))
print("She called him \"interesting\" the other day")
print('She called him "interesting" the other day')
print("Isn't is a \"contraction\"")
print("A\nB")
price = 5
item = "coffee"
print(item + ":\t" + str(price))
print("coffee:\t%.2f" % price)
print(f"{item}:\t{price:.2f}")
names = ["you", "Carol", "Bob"]
names[0] = "anthony"
print(names.index("Bob"))
print([f"{i} squared is {i**2}" for i in range(1, 10)])
set1 = {"A", "B", "C"}
set2 = {"C", "A", "B", 7}
print(set1)
print(set2)
print(set1 == set2)
print(7 in set1)
print(7 in set2)
\ No newline at end of file
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment