1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
devlian [24]
3 years ago
5

Python full code not displayingonly hello prints

Computers and Technology
1 answer:
tankabanditka [31]3 years ago
5 0
From the code you posted, there is no function call to vendingMachine()

Try at the top of your code:

print ("hello")
vendingMachine()

def vendingMachine():
...
You might be interested in
What type of coverage pays for damage incurred as a result of theft, vandalism, fire or natural disaster?
Sloan [31]

Comprehensive or hazard insurance

5 0
3 years ago
What will be a fundamental aspect of future games?
padilas [110]
D. product- oriented :))
6 0
3 years ago
Read 2 more answers
An introduction to object-oriented programming.
Scorpion4ik [409]

Answer:

The csharp program is given below.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

   public partial class Form1 : Form

   {

       public Form1()

       {

           InitializeComponent();

      }

       private void button6_Click(object sender, EventArgs e)

       {

           int total = (Convert.ToInt32(textBox1.Text) +  Convert.ToInt32(textBox2.Text) + Convert.ToInt32(textBox3.Text) + Convert.ToInt32(textBox4.Text) + Convert.ToInt32(textBox5.Text));

           int dozen = total / 12;

           int eggs = total % 12;

           textBox6.Text = dozen.ToString();

           textBox7.Text = eggs.ToString();

       }

       private void button7_Click(object sender, EventArgs e)

       {

           textBox1.Text = "";

           textBox2.Text = "";

           textBox3.Text = "";

           textBox4.Text = "";

           textBox5.Text = "";

           textBox6.Text = "";

           textBox7.Text = "";

       }

        private void button8_Click(object sender, EventArgs e)

       {

           Close();

       }

    }

}

Explanation:

1. The integer variables are declared for total eggs, number of dozens and number of eggs.

2. The input of each text box is converted into integer by using the Convert.ToInt32() method on the value of that particular text box.

3. All the inputs are added and the sum is assigned to variable, total.

4. The number of dozens are obtained by dividing total by 12 and assigning the value to the variable, dozen.

5. The number of extra eggs are obtained by taking the modulus of total and 12 and the value is assigned to the variable, eggs.

6. The integer values in the variables, dozen and eggs, are converted into string using the ToString() function with that particular value.

dozen.ToString();

eggs.ToString();

7. The text boxes are assigned the respective values of dozens and number of eggs.

textBox6.Text = dozen.ToString();

textBox7.Text = eggs.ToString();

8. Two additional buttons, clear and exit, are also added.

9. The clear button erases the contents of all the text boxes. The Text property of each textbox is set to “” thereby clearing all the text fields.

10. The exit button closes the application using Close() function.

11. The program is made in visual studio and the output is attached.

3 0
3 years ago
For this exercise, you are going to complete the printScope() method in the Scope class. Then you will create a Scope object in
iragen [17]

Answer:

Explanation:

The following is the entire running Java code for the requested program with the requested changes. This code runs perfectly without errors and outputs the exact Sample Output that is in the question...

public class ScopeTester

{

public static void main(String[] args)

{

       Scope scope = new Scope();

       scope.printScope();

}

}

public class Scope

{

private int a;

private int b;

private int c;

public Scope(){

a = 5;

b = 10;

c = 15;

}

public void printScope(){

       System.out.println("a = " + a);

       System.out.println("b = " + b);

       System.out.println("c = " + c);

       System.out.println("d = " + getD());

       System.out.println("e = " + getE());

}

public int getA() {

return a;

}

public int getB() {

return b;

}

public int getC() {

return c;

}

public int getD(){

int d = a + c;

return d;

}

public int getE() {

int e = b + c;

return e;

}

}

4 0
2 years ago
What is the most important thing you should avoid when you store files and folders?
iVinArrow [24]
Getting hacked by someone
4 0
3 years ago
Other questions:
  • Complete the paragraph to explain how Angelina can notify readers that her report is just a draft. Angelina has decided to add t
    12·2 answers
  • Which does the histogram resemble the most?
    10·1 answer
  • Whitch action should a user take to ensure that formatting is applied to a row? A. use the ctrl+a keys. B. highlight the whole t
    11·1 answer
  • What keyboard key can you press to limit the angle of the line when using the pencil tool?
    10·1 answer
  • Monitors display images by using a grid made up of millions of tiny dots, called ________.
    13·1 answer
  • Which of the following is a hardware component used to hold the BitLocker encryption key and ensures encrypted data is not acces
    5·1 answer
  • If a person is proactive, they do NOT have to be defensive.<br> True<br> False
    9·2 answers
  • Pls help
    15·2 answers
  • Downlad the file and write a program named Lab10b_Act2.py that does the following: Opens the CSV file for reading Reads the CSV
    15·1 answer
  • _________ is the method used by password crackers who work with pre-calculated hashes of all passwords possible within a certain
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!