Talent Show |Programming_info || python_problem_07

 Mountain View Middle School is all set for organizing their elaborate talent show event of the year, "Stars Onstage". It is a fun-filled event for the students to showcase and build their confidence.

Of the total audience who had come for the show, 1/3 were boys, 3/6 were 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 the total people who visited their show.
 
Input Format:
First line of the input is an integer 'x', which corresponds to the count of girls more than adults.
 
Output Format:
Output the total number of people who had visited the talent show.
Refer sample input and output for formatting specifications.
[All text in bold corresponds to input and rest corresponds to output.]

Sample Input and Output1:
Enter x
50
150 people were there in total

Sample Input and Output2:
Enter x
70
210 people were there in total

Solution:
print("Enter x")
x=int(input())
y=1/3*x+3/6*x
a=1-y
tot=x*3
print(tot," people were there in total")

Share:

No comments:

Post a Comment

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support