Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Overig

A beginner's guide to Python coding

Beoordeling
-
Verkocht
-
Pagina's
35
Geüpload op
09-06-2023
Geschreven in
2021/2022

This lab manual contains around 25 python programs along with its pseudocode/algorithm and output. The python programs comprise of all the most important basic concepts in Python from arithmetic operations, string operations, string functions, basic functions, if -else blocks to looping. The codes are explained in detail by the accompanying algorithm and pseudocode. The variables used in the code are also explained in detail in the PAC table.

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

BCSE101E-Computer
Programming: Python

Cycle Sheet – Phase 1(Module 1-5)




Name: Srijani Ray
Registration Number: 21BCE2559
School of Computer Science and Engineering,
VIT Vellore

,Exercise No. Title Date Page No.

1 M1_CSQ1 12.11.21 3
2 M1_CSQ2 03.01.22 4
3 M1_CSQ3 03.01.22 6
4 M1_CSQ4 12.11.21 7

5 M1_CSQ5 12.11.21 9

6 M2_CSQ1 12.11.21 10
7 M2_CSQ2 03.12.21 11
8 M2_CSQ3 12.11.21 12

9 M2_CSQ4 02.01.22 13

10 M2_CSQ5 26.11.21 14
11 M3_CSQ1 13.11.21 15
12 M3_CSQ2 13.11.21 16

13 M3_CSQ3 13.11.21 17

14 M3_CSQ4 13.11.21 20
15 M3_CSQ5 13.11.21 21
16 M4_CSQ1 15.11.21 22

17 M4_CSQ2 27.11.21 23

18 M4_CSQ3 27.11.21 25
19 M4_CSQ4 14.01.22 26
20 M4_CSQ5 15.01.22 29

21 M5_CSQ1 07.01.22 31

22 M5_CSQ2 09.12.21 32
23 M5_CSQ3 07.01.22 33
24 M5_CSQ4 07.01.22 34

25 M5_CSQ5 16.01.22 34

,[Ex. No. M1_CSQ1]
AIM
To calculate the age of a housefly in seconds, given the number of days the housefly lived.
Algorithm / Pseudocode

Step 1: READ days
Step 2: COMPUTE the product of days, 24 and 3600 and store the value in age
Step 3: PRINT age

Flowchart




Program Code

days=int(input())
age=(days*24)*3600
print(age)

Output

, [Ex. No. M1_CSQ2]
AIM
To input two complex numbers and add the same to produce the result. After producing the
result, print the real part and imaginary part separately.
Algorithm/Pseudocode

Step 1: READ n
Step 2: Declare two lists listl[] and listml[]
Step 3: for i in range (0,n):
READ l and ml
Add l to listl and ml to listml using append()
Step 4: INITIALIZE total and totalml with 0
Step 5: for j in range (0,n):
COMPUTE the sum of totall and value of listl[j] and store in totall
COMPUTE the sum of totalml and value of listml[j] and store in totalml
Step 6: if(totalml>1000):
COMPUTE the quotient of totalml divided by 1000 and store in m
COMPUTE the sum of totall and m and store in totall
COMPUTE the difference between totalml and product of m and 1000 and store
totalml
Step 7: PRINT ("{} litres {} ml".format(totall,totalml))

Flowchart

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
9 juni 2023
Aantal pagina's
35
Geschreven in
2021/2022
Type
OVERIG
Persoon
Onbekend

Onderwerpen

$9.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
srijaniray

Maak kennis met de verkoper

Seller avatar
srijaniray Vellore Institute of Technology
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
2 jaar
Aantal volgers
0
Documenten
1
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen