
PRP411 Practice Questions
Authored by Nomongi Hlatshwayo
Computers
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that checks whether a given number is positive, negative, or zero.
Evaluate responses using AI:
OFF
Answer explanation
To check if a number is positive, negative, or zero, use conditional statements. If the number is greater than zero, it's positive; if less than zero, it's negative; if equal to zero, it's zero.
2.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that calculates the average of all numbers in a list.
Evaluate responses using AI:
OFF
Answer explanation
To calculate the average, sum all numbers in the list and divide by the count of numbers. This can be done using built-in functions like sum() and len() in Python.
3.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that prints all the even numbers from 1 to 50 using a for loop.
Evaluate responses using AI:
OFF
Answer explanation
To print even numbers from 1 to 50, use a for loop that iterates through numbers 1 to 50. Check if each number is even by using the modulus operator (%). If the number % 2 equals 0, print it.
4.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that takes a sentence as input and counts how many words it contains.
Evaluate responses using AI:
OFF
Answer explanation
To count the words in a sentence, split the string by spaces and filter out any empty strings. The length of the resulting list gives the word count.
5.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that creates a text file named example.txt, writes a few lines to it, and then reads and prints the content.
Evaluate responses using AI:
OFF
Answer explanation
To create 'example.txt', use file handling in Python: open the file in write mode, write lines, then close it. To read, open the file in read mode, read the content, and print it. This demonstrates basic file operations.
6.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that prints a multiplication table 10.
Evaluate responses using AI:
OFF
Answer explanation
To print a multiplication table for 10, use a loop that iterates from 1 to 10, multiplying each number by 10 and printing the result. This will display the products of 10 with numbers 1 through 10.
7.
OPEN ENDED QUESTION
30 mins • 5 pts
Write a program that stores student names and their scores in a dictionary. Then, allow the user to input a name and display the corresponding score if it exists.
Evaluate responses using AI:
OFF
Answer explanation
Create a dictionary to store names as keys and scores as values. Use input() to get a name from the user, then check if it exists in the dictionary. If it does, print the corresponding score.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
U.T. 7: Configuración de Routers y Encaminamiento
Quiz
•
Professional Development
20 questions
MS OFFICE QUIZ 01
Quiz
•
Professional Development
15 questions
SOR - RA4
Quiz
•
Professional Development
15 questions
JS
Quiz
•
Professional Development
20 questions
AZ900_SampleQuestions
Quiz
•
Professional Development
16 questions
CPU scheduling
Quiz
•
Professional Development
13 questions
Digital Technology Office 365 - 29May2020
Quiz
•
University - Professi...
18 questions
Direccionamiento IP básico
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...