1.6 Input

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Rules for good variable names

- can use letters and numbers, but no spaces - must start with a letter usually lowercase - variable should describe what it holds

name = input("Who are you?") print("Hello there " + name + " nice to meet you!")

If you type your name on the output it Will come out as: Hello there Taylor nice to meet you!

Input

Pulling information into the computer For this to work, you need to have a spot in memory to hold this value.

Variable

a name for a spot in the computer's memory This value can change while the program runs

Another example of two variables

name = input("Name?") adjective = input("How are you feeling?") print("Hello there, " + name + " nice to meet you. You seem very " + adjective + "today.")


Set pelajaran terkait

bus 101 ch 5, 6, 7 , 8 , 9 study set

View Set

CH 9 vocab Fundamentals of Information Security V2.0

View Set

Chapter 3: Adjusting Accounts for Financial Statements

View Set

WEBSITE MANAGEMENT CUMULATIVE FINAL

View Set

Chapter Two: Adjusting Entries 400

View Set

Networking Unit 5: Network Cabling

View Set

Athletic Training - Chapter Eight

View Set

Exam 2 McGraw Hill Questions 24, 4, 28

View Set