Backend Developer Interview Questions

9,183 backend developer interview questions shared by candidates

Code for a lucky 7 game. Initial balance is 100 Rs. User will get option to click on Play button. If he clicks play, 10 Rs. will get deducted from balance. Then he can select his bet from 3 options : Below 7, Lucky 7, Above 7. Then he can click Roll Dice option. Two dice should get rolled, and total of outcome of both dice should be below 7. Suppose I got 3 on one die and 2 on another die. Then total is 5 which is below 7, So I should get message "Congratulations! You Win!" if outcome is above 7 then user loses game. If user wins, 20Rs will get credited to his balance. Suppose user bet is Lucky 7 and dice total outcome is also 7, then 30Rs will get added to his balance. Also below win or loss message, he should get two options: "Continue" or "Reset and Continue". Continue will keep current balance intact and provide option to bet and roll again. "Reset and Continue" will reset Balance back to 100Rs and provide option to bet and roll again.
avatar

Web Developer (Backend)

Interviewed at Ascendeum

4.4
Jun 28, 2024

Code for a lucky 7 game. Initial balance is 100 Rs. User will get option to click on Play button. If he clicks play, 10 Rs. will get deducted from balance. Then he can select his bet from 3 options : Below 7, Lucky 7, Above 7. Then he can click Roll Dice option. Two dice should get rolled, and total of outcome of both dice should be below 7. Suppose I got 3 on one die and 2 on another die. Then total is 5 which is below 7, So I should get message "Congratulations! You Win!" if outcome is above 7 then user loses game. If user wins, 20Rs will get credited to his balance. Suppose user bet is Lucky 7 and dice total outcome is also 7, then 30Rs will get added to his balance. Also below win or loss message, he should get two options: "Continue" or "Reset and Continue". Continue will keep current balance intact and provide option to bet and roll again. "Reset and Continue" will reset Balance back to 100Rs and provide option to bet and roll again.

Viewing 721 - 730 interview questions

Glassdoor has 9,183 interview questions and reports from Backend developer interviews. Prepare for your interview. Get hired. Love your job.