Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 2 pages
Exam (elaborations)

INTRODUCTION TO PROGRAMMING IN PYTH QUESTIONS WITH COMPLETE SOLUTIONS

Document preview thumbnail
Preview 1 out of 2 pages

INTRODUCTION TO PROGRAMMING IN PYTH QUESTIONS WITH COMPLETE SOLUTIONS

Content preview

D335:aaIntroductionaatoaaProgrammingaainaaPyt
hon

1.22.1aaLab:aaConvertaatoaaSeconds

Writeaaaaaprogramaathataareadsaainaahours,aaminutes,aaandaasecondsnput,
aaas aaan

aaiaaoutputsaatheaatimeaainaasecondsaaonly.: d
2.22.2aaLab:aaConvertaafromaaSeconds

Peopleaafindaaitaaeasieraatoaareadaatimeaainaahours,aaminutes,aaandaasecoratheraathan
ndsaajustaaseconds.
Writeaaaaaprogramaathataareadsaainaasecondsaaasaainputaaandaaoutputsime aat aainaahour

heaataaminutes,aaandaaseconds.: s,
3.22.3aaLab:aaPizzaaaParty

Givenaatheaanumberaaofaapeopleaaattendingaaaaapizzaaaparty,aaoutputaaumber
th aaofa

eaanaaneededaapizzasaaandaatotalaacost.aaForaatheaacalculation,aaassume
aeoplea aaeata

athataapaaslicesaaonaaaverageaaandaaeachaapizzaaahasaa12aaslicesaaandaaa
2co
stsaa$14.95.:
4.22.4aaLab:aaHypotenuse

Givenaatwoaanumbersaathataarepresentaatheaalengthsaaofaaaaarightaatri saalegsaa(side
angle'aaadjacentaatoaatheaarightaaangle),aaoutputaatheaalengthaaofaatheaa saahypotenu
thirdaasideaa(i.e.aawithaatwoaadigitsaaafteraatheaadecimalaapoint.: se)
5.22.5aaLab:aaAreaaaofaaaaaTriangle

UsingaaHeron'saaformula,aayouaacanaacalculateaatheaaareaaaofaaaaatrian youaaknowaath
gleaaifaalengthsaaofaaallaathreeaasides.aaGivenaatheaalengthaaofaaeachaaesiaangleaaasaain
deaaofaaaaatriaaacalculateaatheaaareaaaofaatheaatriangleaausingaaHeron'sput,
a

aformulaaaasaafollowaasaa=aahalfaaofaatheaatriangle'saaperimeter s:
areaaa=aatheaasquareaarootaaofaas(s-a)(s-b)(s-
c),aawhereaaa,aab,aaandaacaaareaaeachaasidesaaofaatheaatriangle.:
6.22.6aaOrderingaaPizza

Aaalocalaapizzaaashopaaisaasellingaaaaalargeaapizzaaaforaa$9.99.aaGivenmber
aat aaofaapizza

heaanuaatoaaorderaaasaainput,aaoutputaatheaasubtotalaaforaatheaapizzas,aasaatputaatheaat
andaathenaaouaaafteraaapplyingaaaaasalesaataxaaofaa6%: otal
7.22.7aaLAB:aaSquareaaroot

Givenaaaaafloating- faatheaagive
pointaanumberaaasaainput,aaoutputaatheaasquareaarootaaoaanumber.: n
8.22.8aaLAB:aaVolumeaaandaaareaaaofaacylinder

1aa
/

Document information

Uploaded on
December 26, 2024
Number of pages
2
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
5
Followers
1
Items
687
Last sold
1 month ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions