Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

17 Cards in this Set

  • Front
  • Back

What is a string

A string is a sequence of one or more characters surrounded by quotes

Can we use single quotes or double quotes on strings?

You can use either as long as the beginning matches the end

What’s an integer

It’s a number without quotes

Describe the data type float

It’s a number with a decimal

What is syntax?

A set of governing rules and principles

What do we call any error that is not a syntax error

An exception

What does != mean?

Does not equal

What’s the difference between x=100 and x==100?

One equal sign means x gets 100 whereas two equal signs means x equals 100

Describe and if-else statement

Code that basically says if something is happening do this, if that thing isn’t happening do this other thing

What does the operator % mean?

It means to calculate the remainder for example 15/4 has a remainder of 3

What’s the code to make something print multiple times

for i in range(n):

What is a Boolean?

A data type that’s value is true or false

When doing math do we have to include print in the code in order to see the result?


What is def ?

Def tells python you are defining a function

How many times do we indent the next line in a compound statement

Indent four times

What would “input” do to a program?

It would make the user enter data

What does ** do?

It’s an exponent