CS 1064 Final: CS-1064 - Exam Review - Week 2

316 views1 pages

Document Summary

Consoles are like a chat box that you can type instructions into. Values help people put data from the real world into machines. Literal values are specific values written in the source code. The print function can print more than just literal values. Values could represent the text of a book, a description, a height, the number of meals eaten this week, an audio recording, etc. (cid:862)(cid:1006)(cid:863) + (cid:1006) produces an error. (cid:862)wow(cid:863)*(cid:1007) (cid:862)wowwowwow(cid:863) (not an error) ***note: an integer divided by an integer produces a float. Doubles in java are referred to as floats in python. Unlike java, python has a special type called none. 1 == 1 false (not an error) 1 < 5 error: example: grade = 85 + 5 is_good_grade = grade > 80 print(is_good_grade) --> prints true print(grade) --> prints 90. Variables are useful because it can help us solve for an unknown value.

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