Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/ / Daily XP 1 2 5 0 Exercise Exercise The if statement Before diving into some exercises on the if statement, have another look

/
/
Daily XP
1250
Exercise
Exercise
The if statement
Before diving into some exercises on the if statement, have another look at its syntax:
if (condition){
expr
}
Remember your vectors with social profile views? Let's look at it from another angle. The medium variable gives information about the social website; the num_views variable denotes the actual number of views that particular medium had on the last day of your recordings. Both variables have been pre-defined for you.
Instructions
100 XP
Examine the if statement that prints out "Showing LinkedIn information" if the medium variable equals "LinkedIn".
Code an if statement that prints "You are popular!" to the console if the num_views variable exceeds 15.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions