Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a Python program that simulates a simple slot machine in which three numbers between 0 and 9 are randomly selected and printed side by side. The user has an initial sum of $100. The user enters his/her bet (make sure it is a valid bet, i.e., the bet is positive and less than or equal to the sum). If the three numbers are the same, the user hits the Jackpot, this means that he wins ten times his/her bet. If only two of the three numbers are the same the user wins four times his/her bet. After each round, the program outputs the sum that the user has and asks the user if he/she wish to continue playing. If yes the program repeats, else, the program displays the total winnings or losses of the user and then ends.


  1. Input a positive integer.
  2. Using while() loop, repeatedly print out the message "CodeChum is awesome" for the same number of times as that of the inputted integer. Each outputted message must be separated in new lines.
  3. Don't forget to make an increment/decrement variable that will increase its value per iteration so as to not encounter a forever loop and have errors, okay?

Create an enumeration named Month that holds values for the months of the year, starting with

January equal to 1. Write a program that prompts the user for a month integer. Convert the

user’s entry to a Month value, and display it.


Make use of methods and arrays


Create an enumeration named Month that holds values for the months of the year, starting with January equal to 1. Write a program that prompts the user for a month integer. Convert the user’s entry to a Month value, and display it. 


Write a program to display the multiplication table of the input number.

Use three functions to perform the following tasks:


- Accept two integers from user. A function capture should do this using its


local variables fnum and snum.


- Modify the contents by multiplying the original values by 10. The function


modify should modify the values of fnum and snum as stated.


- Display the new value to the user. The function display should print to the


user the new values of fnum and snum variables.



  1. Create a class named Person with an instance variable named full_name. Declare one (1) constructor without a parameter and initialize the variable with a default value.
  1. Create a struct named Product where its fields are code, description, and price. 

2.Construct a program in C++ to compute the sum of the digits of the numbers input from the user. Apply all the control structures. Display the number input by the user as well as the sum. Use for loop control structure.


Example display in Console Application

Input number: 93

———output——-

You input number 9 and 3.

The sum of the digits 9 and 3 is 12.


1. Create a C++ program that asks the user to input full name 5times using for, do while and while loop. Then,display.

1.a. For loop

1.b. While loop

1.c Do while loop



Example display in console application


—-This program can accept 5 full names from the user——


Please enter five full names :

Carlo Adam

Justin Doe

Liam Baird

Mike Tan

John Davis


//Expected output:

You entered the following names:

Carlo Adam

Justin Doe

Liam Baird

Mike Tan

John Davis

Congratulations!


LATEST TUTORIALS
APPROVED BY CLIENTS