lec-9-28 - Assignment First program due tomorrow night The...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECS 10 9/28 Assignment First program due tomorrow night. The tricky part: how can you avoid using the digits 1,2,3 and just use the digit 4? But your program is supposed to print 1,2 and 3? Using just the print statement. Why? To show that there are lots of ways to write a program that does the same thing. Submission SmartSite should now be configured properly to accept programs. Submit as attachment. Once you click submit you cannot re-submit Once you click submit, you cannot re-submit. The print statement Prints things. Can print text given in quotes: “Take me to your leader.” is a string . Strings are green in IDLE (on Windows). Strings in English Programming jargon This is a statement . print is a Python command . “Take me to your leader” is a string “9/7” is also a string, because it’s in quotes “9/7” is treated as a piece of text, Python does not do arithmetic.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 The print statement You can also print numbers, and use arithmetic.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.