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

TM111_TMA_02-IT with complete solutions

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
10-02-2023
Geschreven in
2022/2023

Here is an example of how this program could be coded in Python: low_reading_list = [] def green_flag_clicked(): global low_reading_list low_reading_list = [] def space_bar_clicked(): name = input("Enter pupil's name: ") books_read = int(input("Enter the number of books the pupil has read, out of 20: ")) if books_read < 20: low_reading_d(name) green_flag_clicked() space_bar_clicked() print(low_reading_list) Step by step explanation: Detailed explanation: The first line of the code creates an empty list called low_reading_list which will be used to store the names of pupils who have read less than 20 books. The green_flag_clicked() function is defined. This function is called when the Green Flag is clicked in the program. The function uses the global keyword to indicate that it will be modifying the global low_reading_list variable, and then sets the value of low_reading_list to an empty list, effectively clearing it. The space_bar_clicked() function is defined. This function is called when the space bar is clicked in the program. Inside the function, two inputs are asked from the user: name: This is the name of the pupil, entered by the user as a string. books_read: This is the number of books that the pupil has read, entered by the user as an integer. Then there is an if statement which check if the number of books read is less than 20, If it is true then the name of the pupil is added to the low_reading_list using the append() method. Finally, the green_flag_clicked() and space_bar_clicked() functions are called, in that order. The green_flag_clicked() function is called first to clear the low_reading_list The space_bar_clicked() function is called next to prompt the user for the pupil's name and the number of books they've read, and then add the name to the low_reading_list if necessary. At last it prints the low_reading_list Please note that this is just one way of implementing this program and other ways are possible.

Meer zien Lees minder
Instelling
CLC
Vak
CLC









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

Geschreven voor

Instelling
CLC
Vak
CLC

Documentinformatie

Geüpload op
10 februari 2023
Aantal pagina's
6
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$17.99
Krijg toegang tot het volledige document:

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

Maak kennis met de verkoper
Seller avatar
SOARINGHIGH

Maak kennis met de verkoper

Seller avatar
SOARINGHIGH Phoenix University
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
2 jaar
Aantal volgers
0
Documenten
78
Laatst verkocht
-
NURSING TASTE BANKS AND ALL REVISION MATERIALS IN ONE!!!!!!!!!

On this page, you find all documents, package deals, and flashcards i have essential guides that are A graded Here, you will find everything you need in NURSING EXAMS AND TESTBANKS Always leave a review after purchasing any document so as to make sure our customers are 100% satisfied. . I wish you a great, easy and reliable learning through your course and exams. kindly message me for any inquiries or assistance in your studies and i will be of great help. THANKYOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Lees meer Lees minder
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 Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

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

Alisha Student

Veelgestelde vragen