Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Basics Swift Types Recap: Swift Types

walter fernandez
walter fernandez
4,992 Points

. Step 1: Declare a c

I do not who to do this. Can someone help me please?

types.swift
// Enter your code below
let firstValue = 2
let secondValue = 1
let product = 2
let finalOutput = 2 * 1

2 Answers

Luc de Brouwer
seal-mask
.a{fill-rule:evenodd;}techdegree
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,938 Points

I'm not into Swift, but I guess in this case they are asking you to combine variables to output a result like a real calculator

So if I had to try it myself I'd be using the firstvalue & secondvalue to use them in something like this:

finalOutput = firstvalue * secondvalue or something like that

walter fernandez
walter fernandez
4,992 Points

thanks , but i tried already. I appreciate it.

Luc de Brouwer
seal-mask
.a{fill-rule:evenodd;}techdegree
Luc de Brouwer
Full Stack JavaScript Techdegree Student 17,938 Points

Have you tried using this? let firstValue = 1; let secondValue = 2; let product = firstValue * secondvalue;

However Step 2 I can't help you with, so far goes my Swift knowledge, I hope this helps you out a little bit more

walter fernandez
walter fernandez
4,992 Points

hi i did that pedro = "are you joking?" karina = "i am not stupid" pedro = "yes you are, and also you do not know anything of math" pedro = "how much is 123 % 12 ? " karina = i want to know how karina can say that answer because if i type karina = 123 % 12 it appears like a error.