Final Exams: Chapter 1 and 2 Flashcards
What is a variable?
It store data to a name
What is an integer (int)
Interpret the users input as a number
What is a while loop
A while loop continues to run the code until and input changes (ie no)
What does == mean
Equal to
What does != mean
Not Equal to
What does “from random import randint” mean
It tells the program to import the function randint
What an Assignment
It set a name to a value
What is a =
Assignment opperator
What is a print( )
It displays a message screen
What is a input( )
Gets and returns a users value
What is a int( )
Converts characters into numbers
What is ranint( )
produces a random number
What is a string
A series of characters
What is a substring
It is a sequence of characters contained with a another string
In the statement “print(msg.upper)))” what does the dot mean
The dot means “call the method on the specified variable
In the statement “print(msg.upper)))” what does upper() mean
The upper means is a string method