Giter Club home page Giter Club logo

ios-cw-8's Introduction

العمليات الحسابية

فيديوهات الدرس


شرح الدرس

العمليات الحسابية التي يمكن استخدامها في البرمجة وطريقة كتابتها

  • الجمع +
  • الطرح -
  • الضرب *
  • القسمة /
  • باقي القسمة %

يمكنك حفظ نتيجة العملية الحسابية في متغير

var number = 12+8

عملية التحويل بين أنواع البيانات Casting

var stringNumber = "9"

var doubleNumber = Double(stringNumber) ?? 3.8

تمرين

في هذا التمرين سنقوم بتعلم العمليات الحسابية

1.قم بإنشاء ملف playground

 File > new > playground > blank

2.قم بإنشاء ثلاث متغيرات

  • الاسم name
  • تاريخ الميلاد birthdayYear
  • العمر age

3.في متغير age قم بحسب عمرك من خلال متغير birthdayYear

Hint: current year - birthday

4.قم بطباعة الجملة التالية واستخدم المتغيرات التي قمت بإنشائها مسبقا

Hello my name is your name and my age is your age

5.قم بإنشاء ٣ متغيرات:

الأول من نوع String يحتوي على رقم 8

الثاني من نوع Int يحتوي على رقم 4

الثالث من نوع Double يحتوي على 2.5

6.قم بعملية الجمع بين المتغير الأول والثاني وضع النتيجة في المتغير الثالث .

Hint: ✨ Casting

ios-cw-8's People

Contributors

safeyahshemali avatar adnan-alfadhli avatar omsi96 avatar retajalotaibi avatar bodouralrashidi avatar shaimaa1236 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.