PythonByteSize
  • Home
  • Video Index
    • 1. The Basics
    • 2. Python Program Structures
    • 3. Python Operators
    • 4. Python Functions
    • 5. Introduction to Classes and Objects
    • 6. Python Strings
    • 7. User Defined Functions
    • 8. Classes and Objects
    • 9. Python Dictionaries
    • 10. Python tkinter
    • 11. Python Lists
    • 12. Python Namespaces
    • 13. Turtle Graphics
    • 14. Python Tips
    • 15. Complex Numbers
  • 1-Minute Videos
  • Exercise Index
    • 1. The Basics Exercises
    • 2. Python Program Structures Exercises
    • 3. Python Operators Exercises
    • 4. Python Functions Exercises
  • Donate
  • Computing Topics
  • Mathematics
  • Educators
  • Contact
  • About

Exercise 1.4. (Python Keyboard Input)

the_basics_lesson_4_exercise.pdf
File Size: 274 kb
File Type: pdf
Download File


1. Ensure you have viewed the video (associated with this exercise) at this link >>

2. Open up the Python GUI and enter the program shown below:
Picture

3. Run the program and you should see the following screenshot.

Picture
In response to the user friendly prompt enter the following text.

He's not the Messiah, he's a very naughty boy!

What was the program output?

4. Amend the program as requested below then save and run the program

Picture
Did the program still work?

5. Write a program that asks a user to enter their name (use an input function). Then have it ask for the first line of their address (use another input function). Display their name on one line and their address on the next line.

Make sure the program is user friendly (i.e. have prompts that guide the user on what they should be entering).

END    Next Exercise >>

Please consider donating to help with the costs incurred in developing this website.             Donate >>