a group of interconnected computing devices capable of sending or receiving data
Computer Network
=
The assignment operator
converts a string to an integer
int()
A variable can start with a hyphen
False
a group of computing devices and programs working together for a common purpose
Computing System
declare a variable with the name score and with a value of 6
score = 6
converts a strong to a floating-point number
float()
A variable that is represented by either true or false
Boolean
a physical artifact that can run a program.
Computing Device
This variable is used to represent numeric values such as integers, decimals, and fractions
Number Variable
converts a value to a number
num()
playerName = " Jennifer "
What is "Jennifer" referred to as
String
a high-level, interpreted programming language known for its simplicity and readability.
Python
Name 5 Arithmetic Operators
addition, subtraction, division, multiplication, and modulus(/)(remainder)
converts a value to a string
str()
True or False
Variables are case-sensitive
True
a name that represents a value.
Variable
==
equal to
converts a value to Boolean
bool()
What variable naming starts with a lowercase word followed by capitalized words?
Camel Case
A form of variable naming where the first word starts with a lowercase letter, and the subsequent words begin with uppercase letters. There are no spaces or punctuation between the words.
Camel Case
>
greater than
Implicit
playerName = "Jennifer"
playerScore = 5
message = "Our player %s has the score of %s."%(playerName,playerScore)
player.say(message)
Our player Jennifer has a score of 5
(%s) is also known as the “string-formatting operator”
Modulo Operator
<
less than
type of conversion explicitly converts one data type to another using functions or operators
firstName = Jennifer
or
firstName = "Jennifer"
values that we pass into a function
Arguments
>=
greater than or equal to
playerScore = 4
extraPoint = 3
finalScore = playerScore + extraPoint
What is the value of the variable finalScore
7
player1 = 7
player 2 = 5
if player1 > player2:
player.say("Player 1 wins")
is this true or false and what will the output be
True: "Player 1 wins!"
a set of commands that a computer follows to perform operations or calculations
Algorithm
<=
less than or equal to
playerName = "Jennifer"
playerScore = 3
message = "Our player %s has the score of %s."%(playerName, playerScore)
player.say(message)
What will the player say in the code above
Our player Jennifer has a score of 3
is_sunny = True
if is_sunny:
player.say("What a nice day")
else:
player.say("Let's stay inside today")
True: "What a nice day"
False: "Let's stay inside today"