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

MTA EXAM || WITH COMPLETE SOLUTIONS!!

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
01-03-2025
Geschreven in
2024/2025

HOW TO USE THE DIFFERENT FUNCTIONS WITHIN THE RANDOM LIBRARY correct answers use: from random import ___ use from random import randint when wanting to generate random integers use from random import randrange, lets you import a range of numbers and gives you a random number within the numbers given. Ex: (1,6) -- gives a random number from 1 to 5 use from random import rand When declaring variables in Python, a data type must be specified True of False correct answers false Python makes the distinction between integers and floating variables. True of False correct answers True When setting a boolean variable, the value must start with a capital letter True of False correct answers True, meaning it must begin with True or False what are concatenation symbols correct answers commas if different data type and plus signs if they are the same data type improper syntax of way the varibles are written when declared correct answers spaces and dashes should not be used when declaring variables evaluate this statement: a =5 b=3 b=a correct answers since b = a then a == b and b = 5 not 3 anymore, so a is b what keywork in python checks to seee if a number or text is available correct answers the keyword "in" and then the name of the variable code to print our letter grades of students correct answers def grades(): if score =90: grade = 'A' if score =80: grade = 'B' if score =70: grade = 'C' else: grade = 'F' WHAT keyword is used as a placeholder for a conditional result? correct answers pass

Meer zien Lees minder
Instelling
MTA
Vak
MTA









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

Geschreven voor

Instelling
MTA
Vak
MTA

Documentinformatie

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

Onderwerpen

Voorbeeld van de inhoud

MTA EXAM || WITH COMPLETE SOLUTIONS!!
HOW TO USE THE DIFFERENT FUNCTIONS WITHIN THE RANDOM LIBRARY
correct answers use:
from random import ___

use from random import randint when wanting to generate random integers

use
from random import randrange, lets you import a range of numbers and gives you a random
number within the numbers given. Ex: (1,6) -- gives a random number from 1 to 5

use
from random import rand

When declaring variables in Python, a data type must be specified

True of False correct answers false

Python makes the distinction between integers and floating variables.

True of False correct answers True

When setting a boolean variable, the value must start with a capital letter
True of False correct answers True, meaning it must begin with True or False

what are concatenation symbols correct answers commas if different data type and plus signs
if they are the same data type

improper syntax of way the varibles are written when declared correct answers spaces and
dashes should not be used when declaring variables

evaluate this statement:

a =5
b=3
b=a correct answers since b = a then a == b and b = 5 not 3 anymore, so a is b

what keywork in python checks to seee if a number or text is available correct answers the
keyword "in" and then the name of the variable

code to print our letter grades of students correct answers def grades():
if score >=90: grade = 'A'
if score >=80: grade = 'B'
if score >=70: grade = 'C'
else:
grade = 'F'

WHAT keyword is used as a placeholder for a conditional result? correct answers pass

, the while keyword starts a ... correct answers loop

what does the continue keyword do correct answers skips a turn in the loop

difference between \ , \n ,\\, and \t correct answers the symbol \ tells python to continue the
statement on the next line

\n tell python to print a new line

\t tells python to insert a tab
\\ tells python to use the \ character

how to open a file and read it // without being able to write in it correct answers
variableName = open ('fileName', "r")
newVariableName = variableName.read()
print (newVariableName)

how to free up the memory that a file has been using after opening a file correct answers
using the example below:

variableName = open ('fileName', "r")
newVariableName = variableName.read()
print (newVariableName)

to close:
variableName.close()

How to get this file to only read the first line:

workFile = open('work.txt', 'r')
workFileFirstLine = __________?
print (workFileFirstLine) correct answers workFile.readline()

.readline is a built in function that reads the first line

when using python in a command line environment, what command will list available python
commands and show information on these commands when an individual command is
entered? correct answers help ( )

difference between user, logic, runtime and syntax error correct answers user - idk

logic - program doesnt crash, but produces an incorrect result , cause by mistake in the
programs logic

runtime- can include division by 0 , in summary with a runtime error you get your code to
start but as the program is running it stops because of an error

syntax- python doesnt understand ur code and cant run it

methods to use when trying to write code that handles errors gracefully correct answers USE:
€10,03
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.
ProPerfomer (self)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
433
Lid sinds
3 jaar
Aantal volgers
322
Documenten
8679
Laatst verkocht
2 weken geleden
Global Scholars’ Resource Hub

Welcome to your ultimate exam success hub! We provide top-quality, up-to-date, and approved exam materials—study guides, practice tests, and notes for a variety of subjects. Whether you’re preparing for school, college, or professional exams, our resources are designed to help you study smarter and score higher. Thousands have passed with our materials—now it’s your turn!Need more resources or something specific? Contact me anytime, and I’ll be happy to help you find exactly what you need. Your success is our mission!" ✅ Covers multiple subjects and exam types ✅ Includes real practice questions, answers, and study tips ✅ Ideal for students, test takers, and last-minute review Your Exam Success Starts Here – Grab Your Bundle Before It’s Gone!

Lees meer Lees minder
3,8

84 beoordelingen

5
36
4
25
3
9
2
2
1
12

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