How to use a Python function call

Patrick

Python function call

In the last post introducing Python, I demonstrated how to make a simple app using variables and conditional statements. In order to do anything really powerful in a given programming language though, you need to understand functions! In this post, we’ll discuss the Python function call.

What is a Python function call?

Before we look at how to call a function in Python, we first need to familiarize ourselves with the concept.

Also read: Best online Python courses

Functions are used throughout programming as a way to group certain tasks together. This becomes useful in a variety of circumstances,

Microsoft Surface Headphones 2 review: perfect for work-from-home life

Patrick

Microsoft achieved something very impressive with the original Surface Headphones: the company was able to leapfrog veterans of the noise-canceling headphone market (like Bose and Sony) with an ingenious method for controlling them. With a twist of the smooth-turning dial on either ear cup, you could adjust volume and the level of active noise cancellation. It felt instantly intuitive and so satisfying — one of those things that left you wondering how no one else had seized on the idea sooner. But the Surface Headphones fell short when it came to battery life and sound quality. And Microsoft tried to

The story of cheaper batteries, from smartphones to Teslas

Patrick

Aurich Lawson / Getty

In 2010, a lithium-ion battery pack with 1 kWh of capacity—enough to power an electric car for three or four miles—cost more than $1,000. By 2019, the figure had fallen to $156, according to data compiled by BloombergNEF. That’s a massive drop, and experts expect continued—though perhaps not as rapid—progress in the coming decade. Several forecasters project the average cost of a kilowatt-hour of lithium-ion battery capacity to fall below $100 by the mid-2020s.

That’s the result of a virtuous circle where better, cheaper batteries expand the market, which in turn drives investments that produce further

Four bays are better than two

Patrick

I recently wanted to get some more storage because the archive footage for my Gary Explains videos had outgrown my current setup. I thought about replacing some internal drives in my PC or maybe adding another external drive (or two). Those would all have been workable solutions, but I had an itch to buy a NAS since I have never owned one before. Buying a NAS would solve my storage problems and allow me to play with a new bit of kit. After buying the NAS and setting it up, I thought it would be good to do a mini

Apple has moved some AirPods Pro manufacturing from China to Vietnam

Patrick

Some Apple AirPods Pro cases now say the headphones are assembled in Vietnam, according to a Twitter user, multiple reports on the MacRumors forums, and one Verge staffer who recently purchased a pair, indicating the company may be reducing its reliance on Chinese manufacturing (via MacRumors). Typically, AirPods Pro units contain a message on the back of the case that says the device was assembled in China.

Here’s a photo of what the new message looks like:

Photo by Kara Verlaney / The Verge

Apple famously assembles a large majority of its products in China. But

Samsung announces an outdoor 4K TV called the Terrace

Patrick

Samsung is a dominant force when it comes to TV market share in living rooms, and now, the company wants to extend that success to the outdoors. Today, Samsung is announcing the Terrace, the latest TV in its “lifestyle” family that includes the Serif, Frame, and Sero. The Terrace is designed for outside viewing: it’s IP55 water and dust resistant, and the screen can crank up to a brightness of 2000 nits to help you see everything even when the sun’s out.

If you’re unfamiliar with specialty outdoor TVs, the prices of the Terrace might strike you as wildly

Microsoft’s romance with open source software is on display at Build 2020

Patrick

An absolute ton of new announcements has been coming out of this week’s Microsoft Build 2020 virtual conference for Windows developers. While cool, most of them are a little thin for individual reports—so we’ll get you up to speed on them in this roundup, with links out to each topic if you’re interested in more.

Windows Terminal goes 1.0

An affordable flagship done right

Patrick

These are interesting times for smartphone buyers. While OnePlus pioneered the concept of an affordable flagship smartphone, Xiaomi, Realme and many others have sustained the momentum. Packing specifications that rival top-of-the-line hardware and nearly matching the experience, the line between a value flagship and a true premium device is blurry at best.

Enter the Galaxy S10 Lite. Samsung’s flagship property has so far skirted away from the $500 to $600 segment, but changing times call for radical new solutions.

The Galaxy S10 Lite errs close to the full featured Galaxy S10 experience with top-end internals, a software experience to

Subscribe US Now