Skip to content
This repository was archived by the owner on Jun 4, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added .format() function with print
  • Loading branch information
simson1 authored Oct 19, 2018
commit b2b442252f6efd782383ffba4ad9e5c68d57a1ba
12 changes: 12 additions & 0 deletions challenges/1.1.Print/lesson.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ file=’’
```
**_Instructions:_**
**Put your name and sname to appropriate places, change '*' to parameters of separator '_' and in the end of the line '!'.**
The print() function can be used with str.format() function
```
>>> print(“Hello World to {}".format("Geek"))
Hello World to Geek
>>> print(“{} Hello World to {}".format("Hello","Geek"))
Hello World to Geek
>>>a=2
>>> print(“{} is the value of a".format(a))
2 is value of a
```
**_Instructions:_**
**put your own name instead of geek and change the value of the variable to something else**