CS 1110 Lecture Notes - Lecture 7: Negative Number

27 views1 pages

Document Summary

9/12/18: spaces are just as important as any letter. Input must look like an integer: changes character values to actual integers rather than just variables num1 = int(input("please enter an integer: ")) => please enter an integer: 1. # string input coerced to int num2 = int(input("please enter another integer: ")) => please enter another integer: 2 print(num1 + num2) => 3 (sum rather than concatenation) If (cid:272)ou(cid:374)t(cid:1005) is (cid:1006), the(cid:374) evaluates the e(cid:454)p(cid:396)essio(cid:374) to (cid:1007) so the(cid:374) (cid:272)ou(cid:374)t(cid:1005) (cid:272)ha(cid:374)ges to.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents