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
Vlad [161]
3 years ago
9

What am I doing wrong?

Computers and Technology
1 answer:
Temka [501]3 years ago
8 0

In your example, you're asking the user for a number and then you're setting total and nums equal to zero. This results in your first number being ignored by the program. I included the complete working code below:

num = int(input("Enter a number: "))

total = num

nums = 1

while (total <= 100):

   num = int(input("Enter a number: "))

   nums = nums + 1

   total = total + num

print("Sum: "+str(total))

print("Numbers Entered: "+str(nums))

I hope this helps!

You might be interested in
Find the smallest value of n such that LCM of n is 15 is 45​
raketka [301]

Answer:

n=9

Explanation:

LCM(n,15)=45

LCM(9,15)=45

8 0
3 years ago
Within how many days can a deleted view be restored?
Nadya [2.5K]

ofcourse within 34-35 Days

3 0
3 years ago
write a loop that reads positive integers from standard input and that terminates when it reads an integers that is not positive
rjkz [21]
I found this loop. But it ends like this: After the loop terminates, <span>it prints out the sum of all the even integers read. Declare any variables that are needed.</span>

<span>int sum=0;
int num=1;
while(num > 0){
cin >> num;
if ((num % 2)==0 & (num>0)){
sum+=num;
}
}
cout << sum;

I'm not familiar with coding but I think you can work on this loop and edit it according to your requirement.</span>
7 0
3 years ago
A_______ to show the working of an object before it is built or made. A. Prototype b. Test c. Evaluation d. Plan
tresset_1 [31]

Answer:

A. Prototype

Explanation:

8 0
3 years ago
Jane wants to add a chart to her presentation so she’ll click the Insert tab and in the Images group, she’ll click the Chart but
kap26 [50]

(A. Stevie only) because You need to go the illustrations tab in order to click on the chart button.

Jane clicked on images tab so she was wrong.

Mark as brainlest plz :)

3 0
3 years ago
Other questions:
  • In the 1950s, the three major networks (ABC, NBC, and CBS) developed prime-time shows that would appeal to a general family audi
    11·1 answer
  • Which best describes a VPN?
    14·2 answers
  • Why do local variables lose their values between calls to the function in which they are
    5·1 answer
  • What two windows tools can you use to know how much ram is installed on your system?
    10·1 answer
  • ¿Por qué es importante generar proyectos innovadores?
    8·1 answer
  • How do you use a iPad when it has a password ?
    9·2 answers
  • To convince the server that a user is authentic, the authentication server creates a _________ that contains the user's ID and n
    13·1 answer
  • The Michael Porter Diamond of National Advantage is a framework that explains why countries foster successful multinational corp
    11·1 answer
  • Major characteristics of the bus in computer architecture​
    8·1 answer
  • When a person's personal information is collected by other parties, it refers to the issue of
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!