Обсуждения
Write a python program which will ask user to enter 3 numbers. Your program will output the sum and average of these 3numbers.your program will also output the largest number, the smallest number of these three. For exampleif user enter 2,10,3 than your program will output,
For number 2,10,3 sum is 15,average is 5,the largest number is 10 and the smallest number is 2.
-1 голос
4 ответовwhat should i use to get in to next line ?
words=["Hello","world","!"]
print(words[0]) {then i pushed enter to write next line,but gave me answer , i mean i couldn't follow order that has been given}
Hello
and how should i write print(words[1]) in next lint without interruption? 😕
0 голосов
4 ответовWrite a program to return the area of Geometricshapes square and rectangle. Area of square is side*side, rectangle is length*breadth. The controlling class should display the following menu and respond to the user’s selection
Mean
1. Calculate area of square
2. Calculate area of rectangle
3. Quit
Enter your choice (1-3):
0 голосов
3 ответовWhen I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 голосов
4 ответовIs it possible to make my code run without having to press Enter on my IDE? For example: if I'm making a calculator and I want the calculations to be made as soon as I press "=" after typing the numbers and the operator?
Say I wanted to add two numbers: can it calculate automatically as soon as I write "2+3=" without having to press Enter?
0 голосов
5 ответовusing a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.
0 голосов
1 ответWhen I enter two numbers the sum comes.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 голосов
2 ответовCould someone please help me with this..
Write code for an applet class that contains three labels First Number, Second Number, and Sum; three text fields for displaying the values of First Number, Second Number, and Sum, respectively; a button labeled Add. The applet allows the user to enter two integer values and displays the Sum if the Add button is clicked.
Write a html page to run and display the applet appropriately
0 голосов
4 ответовwhat languages are needed to allow customers to upload a form to a server, which can then be displayed on another page (Similar to ebay). i cant wrap my head around what code is needed (other than the method=post)...i have created a database using sql but cant make sense of how to allow a user to enter details...for it to then appear on the home page of my website for example. many thanks!
0 голосов
2 ответовАктуальное сегодня
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes