Uploaded by Gija Goodfriday

60666291 INF1511 01

advertisement
SHIKWAMABANA GG
[14/06/2019]
60655291
NAME: SHIKWAMBANA GIJA GOOD-FRIDAY
STUDENT NUMBER: 60655291
UNIQUE NUMBER: 697447
ASSIGNMENT: 1
MODULE CODE: INF1511
SHIKWAMABANA GG
60655291
Table of Contents
content
QUESTION 1
QUESTION 2
pages
2
3
QUESTION 3
4
QUESTION 4 AND REFRENCES
5
1
SHIKWAMABANA GG
QUESTION 1.
>>>
>>>
>>>
>>>
>>>
The
2
#This code computes the area of a rectangle
length=10
breadth=60
area=length*breadth
print("The are is", area)
are is 600
60655291
SHIKWAMABANA GG
QUESTION 2.
>>>
>>>
>>>
>>>
>>>
The
>>>
3
#This program calculate the area of rectangle with float values
length=12.12345
breadth=6.12345
area=length*breadth
print("The area of rectangle is %.2f"%area)
area of rectangle is 74.24
60655291
SHIKWAMABANA GG
Question 3
>>> myname= " gija goodfriday "
>>> mysurname= " shikwambana "
>>> print(" i am "+myname+mysurname)
i am gija goodfriday shikwambana
>>>
4
60655291
SHIKWAMABANA GG
60655291
Question 4
>>> nApples=20
>>> nKids=7
>>> Divide=nApples/nKids
>>> left=nApples-(nKids*Divide)
>>> print("There are %d kids and %d apples. Each kid gets %d apples, and %d
apples remain," %(nKids,nApples,Divide,left))
There are 7 kids and 20 apples. Each kid gets 2 apples, and 0 apples
remain,
>>>
REFERENCES
 PYTHON 3.4.0 SHELL
 INTRODUCTION TO PYTHON PROGRAMMING AND DEVELOPING GUI
APPLICATIONS WITH PYQT
5
Name:SHIKWAMBANA GIJA GOOD-FRIDAY
Student Number:60655291
Course:INF1511
Declaration
I know that plagiarism is wrong. Plagiarism is to use another’s work and pretend that
it is one’s own.
I have used the ………TEXTBOOK AND PYTHON…………………… convention
for citation and referencing. Each contribution to, and quotation in, this
essay/report/project/……ASSINGMENT………… from the work(s) of other people
has been attributed, and has been cited and referenced.
This essay/report/project/……ASSINGMENT…………….. is my own work.
I have not allowed, and will not allow, anyone to copy my work with the intention of
passing it off as his or her own work.
Signature ___SHIKWAMBANA GG___________________________
Date ________04/02/2020__________________________
Download