11/28/2023 0 Comments Thonny write a switch statementWhat are the rules for creating a valid variable name?ħ. Then examine the following lines of valid code. Did you notice how form became purple in Thonny (it is a function). Examine the errors that occurred when executing the lines of code in question 5. your name = input("What is your name?")Ĭ. The idea here is to figure out how a variable name can be writtenī. Hint, edit the above code, don't rewrite from scratch. What happens when you execute each of the following lines of Python code? The word name in the Python code is a variable – name given to a memory location used to store data.ĥ. Is the string literal " name" printed when the second line of Python code is executed? What is printed? Notice that the word name is in both lines of code. Where is the data stored when the user enters something and presses the Enter button?Ĥ. What appears in the console window when this line of code is executed?įYI: The words that appear on the screen to tell the user what to enter is known as a prompt.Ĭ. ![]() What happens when this line of code is executed?ī.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |