206k views
0 votes
Who can help me with 50 varables on codeskulptor​

User Ricbermo
by
7.3k points

1 Answer

7 votes

Answer:variables - placeholders for important values

# used to avoid recomputing values and to

# give values names that help reader understand code

# valid variable names - consists of letters, numbers, underscore (_)

# starts with letter or underscore

# case sensitive (capitalization matters)

# legal names - ninja, Ninja, n_i_n_j_a

# illegal names - 1337, 1337 ninja

# Python convention - multiple words joined by _

# legal names - elite_ninja, leet_ninja, ninja_1337

# illegal name 1337_ninja

# assign to variable name using single equal sign =

# (remember that double equals == is used to test equality)

# examples

my_name = "Joe Warren"

print my_name

my_age = 51

print my_age

# birthday - add one

#my_age += 1

print my_age

# the story of the magic pill

magic_pill = 30

print my_age - magic_pill

my_grand_dad = 74

print my_grand_dad - 2 * magic_pill

Explanation:placeholders for important values. 2. # used to avoid recomputing values and to. 3. # give values names that help reader understand code. 4. ​. 5. ​.

User Emax
by
6.1k points