Mechatronics Engineering Google Site
Special Instructions:
Entry Ticket - House Keeping
- Can you now get to IC:
- can you log into Infinite Campus and check your grade. IC Login
- If not fill out this form again IC Quiz
- LinkedIn - Job and Internship Opportunities
- Message me on LinkedIn if you would want to hear about Job or Internship opportunities
- Explora Vision - Honorable mention - https://www.exploravision.org/2019-honorable-mentions
- Open Lab and Robot Club Blogs - Robot Club
Mechatronics Engineering Plan For Today:
|
Python - Files
- LAB - Duration: 60 Min
- Link: Pythonlearn-07-Files
- Instructions & Expectations:
My ZIM Code:
#Zim
# this is my file read example
# xfile=open('mbox-short-short.txt')
fname=input('enter a file name ')
#fname="zimShort.txt"
try:
fhand=open(fname)
except:
print('bad dog... no file found')
quit()
# Challenge 1
print(fhand)
counterOfLine=0
counterOfChar=0
counterOfZim=0
counterOfStartsWithZim=0
realZimCount=0
for line in fhand:
# Challenge 2
counterOfLine=counterOfLine+1
# Challenge 3
counterOfChar=counterOfChar+len(line)
#Challenge 4.1
if 'Zim' in line:
counterOfZim=counterOfZim +1
#print(line)
#Challenge 4.2
if line.startswith('Zim:'):
counterOfStartsWithZim=counterOfStartsWithZim +1
line = line.rstrip()
#real Challenge 4.1
lineListZim=line.split()
print(lineListZim)
for realZim in lineListZim:
if 'Zim' in realZim:
realZimCount=realZimCount +1
print('line count =', counterOfLine)
print('char count =', counterOfChar)
print('Zim count =', counterOfZim, 'Wait, is that right?')
print('Zim: count =', counterOfStartsWithZim)
print('Real Zim: count =', realZimCount)
# this is my file read example
# xfile=open('mbox-short-short.txt')
fname=input('enter a file name ')
#fname="zimShort.txt"
try:
fhand=open(fname)
except:
print('bad dog... no file found')
quit()
# Challenge 1
print(fhand)
counterOfLine=0
counterOfChar=0
counterOfZim=0
counterOfStartsWithZim=0
realZimCount=0
for line in fhand:
# Challenge 2
counterOfLine=counterOfLine+1
# Challenge 3
counterOfChar=counterOfChar+len(line)
#Challenge 4.1
if 'Zim' in line:
counterOfZim=counterOfZim +1
#print(line)
#Challenge 4.2
if line.startswith('Zim:'):
counterOfStartsWithZim=counterOfStartsWithZim +1
line = line.rstrip()
#real Challenge 4.1
lineListZim=line.split()
print(lineListZim)
for realZim in lineListZim:
if 'Zim' in realZim:
realZimCount=realZimCount +1
print('line count =', counterOfLine)
print('char count =', counterOfChar)
print('Zim count =', counterOfZim, 'Wait, is that right?')
print('Zim: count =', counterOfStartsWithZim)
print('Real Zim: count =', realZimCount)
- LAB - Duration: 40 Min
- Link: Robot Club Google Sites
- Instructions & Expectations: Connect with your Robot Club Team. You will either be working on your Robot Project or an Open Lab Project.
- You will need to account for your time. You will need to convince me by your form submission that you worked given the time allotted.
- If you or your Robot Club Team worked on the Robot Club project, you will make sure your Robot Project Status Google docs are updated.
- If you worked on an Open Lab Project, you will also need to tell me about what you accomplished and what you are planning next.
- How to Submit Assignment: Each Student needs to account for your time.
- Every One Do The Following: Turn in an Open Lab Blog Post
- If you also worked on your Robot Club Project, also UPDATE your Robot Project Status Google docs.
- Dig Deeper: Open Lab:
- Robot Club Google Sites
- Guest LED Lesson
- Printers - Work on taking the printers apart
- TinkerCAD
- Udemy - My Courses (specifically the Arduino Workshop and Electronics Engineering Technology class)
- Assignment - Duration: 2-10 Min
- Instructions & Expectations: Desk cleanup, put away all projects, find your assigned job
- How to Submit Assignment: When Complete, check yourself off on Sign Out Sheet - 2 Points
No comments:
Post a Comment