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 4.4. (Pythons print() function)


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

2. Accurately predict the output of the program below. 
Exercise 4.4. Example 1

    
3. Accurately predict the output of the program below. 
Exercise 4.4. Example 2

    
4. Since Python Version 3.6. Python has the f string. 'Rewrite the last program statement in the program below to give exactly the same output but using the f string. You will find a video on the f string in the tkinter section of this website. It is discussed in a different context but it may be a help. Alternatively, locate the section in the Python help documents that covers the f string.

NOTE: Using help manuals is an essential skill for a programmer the sooner you start to use them the better.
Exercise 4.4. Example 3

    

END    Next Exercise >>

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