I would say that you should use 32 pt font
Answer:
True hope this helps you and everyone!
Answer:
player1Wins = player1Losses = player2Wins = player2Losses = tieCount = 0
score1 = 10
score2 = 10
if score1>score2:
player1Wins=player1Wins+1
player2Losses=player2Losses+1
print("player1 wins")
elif score2>score1:
player2Wins=player2Wins+1
player1Losses=player1Losses+1
print("player2 wins")
else:
tieCount=tieCount+1
print("tie")
Explanation:
Since your indentation can not be understand what you give us, please try to do it as you see in the answer part.
Although it seems that this is a part of the code, it is normal that you get errors. However, since you keep track of the variables, it is better to initialize the variables that will keep the counts. Since initially, they are 0, you may set them as 0. Also, if you assign the values to the scores, probably you would not get any error. This way, you may test your code as I did.
Other than these, in the else part you do not need to write "score1=score2", because if score1 is not greater than score2 and if score2 is not greater than score1, this already implies that they are equal
Answer:
// code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables
int length=10,height=7,width=5;
// find the volume of
int vol=length*height*width;
// find the surface area
int sa=2*(length*width+length*height+height*width);
// find the perimeter
int peri=4*(length+width+height);
// print the volume
cout<<"Volume is: "<<vol<<" cm^3."<<endl;
// print the surface area
cout<<"Surface area is: "<<sa<<" cm^2."<<endl;
// print the perimeter
cout<<"Perimeter is: "<<peri<<" cm."<<endl;
return 0;
}
Explanation:
Declare and initialize length=10, width=5 and height=7.calculate volume by multiply length, width and height and assign to variable "vol".Then find the surface area as 2*(length*width+length*height+height*width) and assign it to variable "sa".Then find the perimeter as 4*(length+width+height) and assign to variable "peri". Print the volume, perimeter and surface area.
Output:
Volume is: 350 cm^3.
Surface area is: 310 cm^2.
Perimeter is: 88 cm.