100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

ITS Python Practice Exam 1 - Python Programming Study Guide Test.

Beoordeling
-
Verkocht
-
Pagina's
10
Cijfer
A+
Geüpload op
05-04-2025
Geschreven in
2024/2025

ITS Python Practice Exam 1 - Python Programming Study Guide Test. Python makes the distinction between integers and floating variables. - CORRECT ANSWER Yes When declaring variables in Python, a data type must be specified. - CORRECT ANSWER No When setting a boolean variable, the value must start with a capital letter. - CORRECT ANSWER Yes A developer wants to make sure a serial number cannot be used in a calculation and that a dollar amount entered as a whole number can have decimals. Then, a message should be displayed to tell a customer the serial number and price for the products. Using the drop-down arrows, fill in the code to use the proper functions to convert the data to the necessary data types. - CORRECT ANSWER str float , A developer needs to write code to reverse the character output of a product code. Which variable declaration will reverse one of the product codes? - CORRECT ANSWER [::-1] In this scenario, the number of complete units needs to be displayed, meaning that anything after a decimal point needs to not be represented. To accomplish this, the int function is needed as it extracts the whole number from a value with a floating decimal. The round function will not work because it will round the number up to 20. The floor function rounds a number down to the nearest integer. The ceil function will raise the number to 20. The correct code is as follows: - CORRECT ANSWER int A developer needs to build a data structure with animals and then sort the structure. Using drag and drop, drag the following lines of code into the correct order to produce this output: Bears Jaguars Lions Panthers - CORRECT ANSWER animals=["Bears","Panthers","Lions"] d("Jaguars") () for animal in animals: print(animal) x=5 y=3 z=x+y> and x*y<15 or x-y>2 - CORRECT ANSWER z= pieces=["king", "queen", "rook", "bishop", "knight, "pawn"] () - CORRECT ANSWER print(pieces[5]) print(pieces[-1]) a == 90 - CORRECT ANSWER Yes b == 2.5 - CORRECT ANSWER No c == -9 - CORRECT ANSWER Yes if grade __ 100: print ("Outstanding") elif grade __ 90: print ("Great") elif grade __ 70: print("Study hard") else: print("You are doing well. Strive to improve") - CORRECT ANSWER == >= <= a__b=13 a__b=7 a__b=3.33 a__b=3 a__3=1 - CORRECT ANSWER + - / // % a == b - CORRECT ANSWER Yes a is b - CORRECT ANSWER Yes b == 3 - CORRECT ANSWER No c is b - CORRECT ANSWER No Look at the following code and then select the correct keyword to use to check to see if the word "nine" is part of the quote. If this code runs, it should return a value of True. - CORRECT ANSWER in Drag the lines of code into the correct order to accomplish the following: The messages "Great month" and "Keep it going" are printed for month sales of over 10000. Not all lines of code will be used. - CORRECT ANSWER if month_sales>10000: print("Great month") print("Keep it going") Choose the correct lines of code to satisfy the needs of the following function: Students with scores of 90 or higher get an A. Students with scores from 80 to 89 get a B. Students with scores from 70 to 79 get a C.

Meer zien Lees minder
Instelling
PYTHON.
Vak
PYTHON.









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
PYTHON.
Vak
PYTHON.

Documentinformatie

Geüpload op
5 april 2025
Aantal pagina's
10
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

ITS Python Practice Exam 1 - Python
Programming Study Guide Test.

Python makes the distinction between integers and floating variables. - CORRECT ANSWER Yes



When declaring variables in Python, a data type must be specified. - CORRECT ANSWER No



When setting a boolean variable, the value must start with a capital letter. - CORRECT ANSWER Yes



A developer wants to make sure a serial number cannot be used in a calculation and that a dollar
amount entered as a whole number can have decimals. Then, a message should be displayed to tell a
customer the serial number and price for the products. Using the drop-down arrows, fill in the code to
use the proper functions to convert the data to the necessary data types. - CORRECT ANSWER str

float

,



A developer needs to write code to reverse the character output of a product code. Which variable
declaration will reverse one of the product codes? - CORRECT ANSWER [::-1]



In this scenario, the number of complete units needs to be displayed, meaning that anything after a
decimal point needs to not be represented. To accomplish this, the int function is needed as it extracts
the whole number from a value with a floating decimal. The round function will not work because it will
round the number up to 20. The floor function rounds a number down to the nearest integer. The ceil
function will raise the number to 20. The correct code is as follows: - CORRECT ANSWER int



A developer needs to build a data structure with animals and then sort the structure. Using drag and
drop, drag the following lines of code into the correct order to produce this output:

Bears

Jaguars

Lions

, Panthers - CORRECT ANSWER animals=["Bears","Panthers","Lions"]

animals.append("Jaguars")

animals.sort()

for animal in animals:

print(animal)



x=5

y=3

z=x+y> and x*y<15 or x-y>2 - CORRECT ANSWER z=



pieces=["king", "queen", "rook", "bishop", "knight, "pawn"]

pieces.sort() - CORRECT ANSWER print(pieces[5])

print(pieces[-1])



a == 90 - CORRECT ANSWER Yes



b == 2.5 - CORRECT ANSWER No



c == -9 - CORRECT ANSWER Yes



if grade __ 100: print ("Outstanding")

elif grade __ 90: print ("Great")

elif grade __ 70: print("Study hard")

else: print("You are doing well. Strive to improve") - CORRECT ANSWER ==

>=

<=



a__b=13

a__b=7
€11,35
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
ROSEGRADES Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
214
Lid sinds
2 jaar
Aantal volgers
87
Documenten
12161
Laatst verkocht
1 week geleden
TOPGRADE

I HELP STUDENTS WITH REVISION MATERIALS WITH BETTER GRADES GUARANTEED. BEST OF LUCK.

3,4

30 beoordelingen

5
10
4
3
3
11
2
2
1
4

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

Veelgestelde vragen