5 Matching Annotations
  1. Oct 2025
    1. Before getting input from the user, it is a good idea to print a prompt telling the user what to input. You can pass a string to input to be displayed to the user before pausing for input:

      to make use of the inout function be sure to make a variable and assigned do = input ("What is your name?\n"0 this will bring the qurstion to come onto the users screen and then wait for a response

      You can pass a string into the input function that would show up on theusers screen

    1. Q2: What is the value of var2 after the following code executes?

      The values of a variable can change throughout the code. In this case, var2 holds 2 values, but whatever is the most recent value is the value that will get assigned to that variable

    1. The variable name 76trombones is illegal because it begins with a number. The name more@ is illegal because it contains an illegal character, @. But what’s wrong with class? It turns out that class is one of Python’s keywords. The interpreter uses keywords to recognize the structure of the program, and they cannot be used as variable names.

      these are wrong because one of the variables start with a number values/digit which violates the varible assignment rule

      The second variable is flagged and in violation because it contians an illegal charcter which is the @ sign

      The last variable "class" fooled me, but it this violates the variable rules because the term class is one of PYTHONS keywords!!! the interperater uses keywords to recognize the sturtues of the program --> therefore NONE of python's keywords can be used as variable names

    1. An assignment statement creates new variables and gives them values:

      an assignment statement seems to not use any paretheses of hard/fast syntax rules, it is assigning a variable to some complied value