![]() ![]() ![]() If not, print “Invalid input”. The total price should be formatted with a two-digit precision as shown below.Įxpected output 3 ( bold is user input) The value entered should be greater than 0. Write a program that asks the number of sushi pieces eaten and compute the total price. His restaurant offers a student discount depending on the number of pieces they eat. Don’t forget to head over to the code runner on Moodle and paste your solution in the answer box!Īshwin opened a sushi restaurant in Seattle. The total pay(pay check) should be formatted with a two-digit precision as shown below.Įxpected output 1 ( bold is user input)Įxpected output 2 ( bold is user input) Instead of printing the negative value of the pay, print “Invalid input ”.įor example, if Punith worked 42 hours (40 hours + 2 hours of overtime), and his pay rate is $12. If a pay rate of -$10 and 41 hours worked, then the pay would be -$415. If one or both input values are negative values, it does not make sense. Hours worked over 40 hours are considered as overtime and should be calculated at 1.5x the pay rate.īe sure to have input validation. Then, it displays the calculated total pay. Write a program that asks the number of hours worked and hourly pay rate, as floating point numbers. Don’t forget to head over to the code runner on Moodle and paste your solution in the answer box! ![]() ![]() The file should be named as practicum.cpp. The practicum average should be a double formatted with a two-digit precision as shown below.Įxpected output 1 ( bold is user input) Enter practicum 1 score: 90 “You can retake practicums during the final. ”Įach practicum score should be an integer value. “You have a passing practicum average. ” If the calculated average score is 67 or higher, then it prints Then, it prints the average score and prints the message depending on the average score. Write a program that asks the user to enter three practicum scores and calculate the average score. It would be useful to have a program to calculate your practicum average. The dynamics verified in the classes, the general opinion of the teachers, and the acceptance and participation of the students allow to classify the experience as positive.In this course, students need to have at least 67 average score on practicums to earn C- or higher letter grades. After the experiments, we used surveys to gather the involved students' and teachers' opinion, and more than 70% of the students answered that they considered the VPL an added value for the teaching–learning process. The students were challenged to test their assignments in VPL with a set of test values previously defined by the teachers. In order to test this concept, an experiment was performed with several classes of beginner programming students, in two editions of Algorithms and Programming course unit of the degree in Informatics Engineering lectured at the Informatics Engineering Department at the School of Engineering, Polytechnic Institute of Porto. That is Virtual Programming Lab (VPL), a Moodle plugin that allows students to submit their code and get prompt feedback without the teacher's intervention. So the main question is: how can we help teachers and students to achieve these goals? We identified a tool that can be useful to this purpose. Also teaching programming is an arduous but challenging task, requiring close follow-up and constant and meaningful feedback. However, learning to program is not an easy task. Programming is one of the basic skills that students must acquire. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |