-
Notifications
You must be signed in to change notification settings - Fork 0
/
ques.py
22 lines (15 loc) · 1.38 KB
/
ques.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'''Mountain view middle school is all set for organizing its elaborate talent show event of the year ,'stars onstage' .it is a fun filled event for the student to showcase and build their confidence of the total audience who had came of them werre adults if there were 'x' more girls and the rest of them were adults.if there were 'x' more girls than adults how many people were there in total ? help the school authorities to find total no of people who visited their show. code it in py'''
'''
To calculate the total number of people who attended the talent show, we can use the following steps:
Let's denote the number of girls as "g" and the number of adults as "a".
We are given that there were "x" more girls than adults. So, we can express the number of girls as "a + x" and the number of adults as "a".
The total number of people who attended the show is the sum of girls and adults, which is "g + a".
Using the information given, we can substitute the expressions for "g" and "a" into the total attendance equation to solve for the total number of people.
Here's the Python code to calculate the total number of people who attended the talent show:'''
# Given
x = 20 # Assume x as 20 for example
# Calculation
a = x # Number of adults
g = a + x # Number of girls
total_attendance = g + a # Total number of people
print("Total number of people who attended the talent show:", total_attendance)