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

Uploading CS 171 Lect 01

parent 99165c25
No related branches found
No related tags found
No related merge requests found
year = 2023
course = 'CS 171'
nextCourse = "CS 172"
print("How old are you?")
age = int(input()) #This is a text value converted to a number
print("Your age is", age)
print("Next year you will be", age+1)
\ No newline at end of file
money = int(input("Enter pennies in the piggy bank: "))
dollars = money // 100
remainder = money % 100
quarters = remainder // 25
print("That's", dollars, "dollars and", quarters, "quarters")
\ No newline at end of file
text = "hello"
number = 99
moreText = " world"
print(text + moreText)
\ No newline at end of file
print("This happens first", end = '...')
print("This happens second")
print("This happens last")
\ No newline at end of file
#Example 1
age = int(input("How old are you?"))
#Example 2
print("How old are you?")
age = int(input())
if age < 18: # Error
votingAge = True
\ No newline at end of file
left = 22
right = 7
print(left + right)
print(left - right)
print(left * right)
print(left / right)
print(left // right)
print(left % right)
print(13 % 867)
print("This happens first", "This happens second", "This happens last")
\ No newline at end of file
print("Hello CS 171") print("Hello CS 171")
print("Hello CS 172") print("Hello CS 172")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment