×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

## INTRO TO COMPUTING

by: Allie West II

28

0

3

# INTRO TO COMPUTING CSCI 1200

Allie West II

GPA 3.51

Staff

These notes were just uploaded, and will be ready to view shortly.

Either way, we'll remind you when they're ready :)

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

COURSE
PROF.
Staff
TYPE
Class Notes
PAGES
3
WORDS
KARMA
25 ?

## Popular in ComputerScienence

This 3 page Class Notes was uploaded by Allie West II on Thursday October 29, 2015. The Class Notes belongs to CSCI 1200 at University of Colorado at Boulder taught by Staff in Fall. Since its upload, it has received 28 views. For similar materials see /class/232001/csci-1200-university-of-colorado-at-boulder in ComputerScienence at University of Colorado at Boulder.

×

## Reviews for INTRO TO COMPUTING

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/29/15
Two operators and under the context of integer division In n m divided by n m n the remainder after m is divided by n For example 7 2 3 7 21 1 EqualityRelationalLogical Operators 2 Relational Operators lt lt gt gt 3 Logical Operators ampamp H 4 IF Statement 0 An statement allows a program to choose whether or not to execute a particular statement 0 An ifelse statement allows a program to do one thing if a condition is true and a different thing if the condition is false 0 Using block statement to execute more than one statement as the result of evaluating a Boolean condition a block is a list of statements enclosed in braces if numl lt num2 min numl max num2 else mm 7 num2 max 7 numl o In a nested statement an else clause is matched to the closet unmatched if numl lt num2 if numl lt num3 min numl else min num3 else if num2 lt num3 min num2 WHILE Statement section 36 o A while statement allows a program to execute the same statement multiple times Line 1 Line 2 while a condition Line 3 Line 4 Line 5 Line 6 The order of execution T T Line 37Line 47Line 5 Line liLine 2 Judge if the condition is met F Line 6 The for statement The while statement is good to use if you don t know how many times you will have to execute the body of a loop The for statement allows you to execute the body of a loop a set number oftimes For example Code that would display 10 9 8 7 6 5 4 3 2 l in the console window written in while and for loops while statement for statement int count 10 while count gt 0 count count 71 Systemoutprintcount for int countlOcountgt0count Systemoutprintcount The structure of the while statement and the for statement while statement for statement variable initialization while condition statement increment for variable initialization condition increment statement The header of a for loop contains three parts separated by semicolons First part initialization sets up a loop control variable Second palt boolean condition checks the loop control variable This condition is evaluated before the loop body True the body of the loop is executed False jump to the next statement after the for statement Third part increment modi es the loop control variable This part is executed after each iteration of the loop It does not have to perform a simple increment The examples of this part could be count subtract 1 from count countcount5 add 5 to count Arrays int height declares an array variable height which will contain integer values the array type information here is given in int height new int11 sets the length ofthe array to be 11 height will be a list with 11 values they will be indexed from 0 to 10 height211 this statement sets the value of the 3rd element in the array at position 2 to be 11 String names Jim Sue Sally declares an array names which will contain string values and gives entire array The length of the array once de ned is constant You can determine the length of an array almost the same way you determine the length of a string For example if names Jim Sue Sally then nameslength 3 Strings To use any of the methods in the string class you must follow the following format youristringivariableinamemethodiname any input the method requires Some useful methods and examples for examples assume myname John Jones toLowerCaseO toUpperCase mynametoLowerCaseO returns johnjones charAtint idx mynamecharAt0 returns J NotelSt position given value of 0 mynamecharAt6 returns 0 length mynamelength returns 10 replacechar oldcharacter char newcharacter mynamereplace l p 9 retums pohn pones Class read the last handout

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Steve Martinelli UC Los Angeles

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Kyle Maynard Purdue

#### "When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the material...plus I made \$280 on my first study guide!"

Steve Martinelli UC Los Angeles

Forbes

#### "Their 'Elite Notetakers' are making over \$1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com