TASK 1:

  • Write a program printline.py that prints second prog the sentence “This is my second program”

  • Print it as a single line

  • Print it with single word on each line

 

dSBJnZwGnlQAAAABJRU5ErkJggg== - Python Learning Week 1 (Solution)

 

98lpPBNbeWgAAAAAElFTkSuQmCC - Python Learning Week 1 (Solution)

 

TASK 2:

  • Which of the following statements are likely to cause problems:​​ 

    • print “This is a valid statement\n”

    • print “This is a valid statement”\n​​ 

    • print “This is a ”valid” statement”​​ 

    • printx “This is a valid statement\n”

B8HFubrAtaInAAAAAElFTkSuQmCC - Python Learning Week 1 (Solution)

crWQJUlvoLAAAAAElFTkSuQmCC - Python Learning Week 1 (Solution)

wME406PXW7uHgAAAABJRU5ErkJggg== - Python Learning Week 1 (Solution)

VX9aVnBORtnumN0jrO36ZOZiNEwAAAABWEswyHFCMGcLMAAAAAABAgqUwy6dPn56LdB2YZdDoFeW+q+YAAAAAAHBwwCwDAAAAAAAABETN8qOPPjqpwvIxywAAAAAAALDMsLIMAAAAAAAAELCyZvnyyy+3iqU56TowywAAAAAAANAXzDIAAAAAAABAwNKaZWeGU6Y4tV9L14FZBgAAAAAAgL5glgEAAAAAAAACeA0bAAAAAAAAIGClzPJXvvKV2iSHkrTweF0HZhkAAAAAAAD6snKvYccMc8woi3QdmGUAAAAAAADoR1H8f1RYpPMN1hPzAAAAAElFTkSuQmCC - Python Learning Week 1 (Solution)

b, c and d will cause problems.

 

TASK 3:

 

Calculator in python:

wfqjNYIeFuydAAAAABJRU5ErkJggg== - Python Learning Week 1 (Solution)

 

 

OUTPUT:

wF4bMrjRd2lPQAAAABJRU5ErkJggg== - Python Learning Week 1 (Solution)

 

 

wPHgkkZftCchAAAAABJRU5ErkJggg== - Python Learning Week 1 (Solution)